Univention Bugzilla – Bug 40119
We need a simple way to run commands inside a docker app container
Last modified: 2015-12-09 16:47:11 CET
This already works: docker exec $(ucr get appcenter/apps/$appid/container) COMMAND But this is hard to explain and not very pretty. We would need something like univention-app within $appid COMMAND to enable ISVs to write pretty documentations. Default should be /bin/bash Better use -it (interactive terminal)
Fixed in univention-appcenter 5.0.19-18.77.201511302249 Command is univention-app shell $appid COMMAND Default for COMMAND: DockerShellCommand in the app's ini file (which defaults to /bin/bash) Done for containers not having /bin/bash, so that this can be overridden to /bin/sh. Leaving it empty rejects univention-app shell commands.
Do not log command to stdout; do not require -- to pass args to command univention-appcenter 5.0.19-19.78.201512031352
OK: advisory OK: Tests: # touch /var/lib/docker/overlay/3b905a333141eed75eff4aedab7ad0f81cce01c7a938a32d016dec51851e2b21/merged/in_dudle-docker_container # ls /in_dudle-docker_container ls: Zugriff auf /in_dudle-docker_container nicht möglich: Datei oder Verzeichnis nicht gefunden # univention-app shell dudle-docker ls -l /in_dudle-docker_container -rw-r--r-- 1 root root 0 Dec 3 14:21 /in_dudle-docker_container # univention-app shell dudle-docker cp --help Usage: cp [OPTION]... [-T] SOURCE DEST or: cp [OPTION]... SOURCE... DIRECTORY or: cp [OPTION]... -t DIRECTORY SOURCE... Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. [→ '--help' goes to command, not univention-app] # univention-app shell --help usage: univention-app shell [-h] app ... [→ '--help' goes univention-app]
TERM environment variable not set: # univention-app shell dudle-docker root@dudle-docker-1449012158371627:/# top TERM environment variable not set. Please change the call for shell without command to copy the TERM var from the users env. For example: # docker exec -it 36defb298cc3 /bin/sh -c "export TERM=$TERM; cd \$HOME; exec /bin/bash"
(In reply to Daniel Tröder from comment #4) > TERM environment variable not set: > > # univention-app shell dudle-docker > root@dudle-docker-1449012158371627:/# top > TERM environment variable not set. > > > Please change the call for shell without command to copy the TERM var from > the users env. For example: > > # docker exec -it 36defb298cc3 /bin/sh -c "export TERM=$TERM; cd \$HOME; > exec /bin/bash" Yes, I opened a new bug for it: Bug#40192
<http://errata.software-univention.de/ucs/4.1/27.html>