Appendix: Single Docker Commands
Compose is the documented installation path. This appendix lists the equivalent
individual docker commands, for troubleshooting a running installation or for
understanding what Compose does.
Which container is Compose running?
Section titled “Which container is Compose running?”docker compose psdocker inspect ktdocker0 --format '{{.Config.Image}} {{.State.Status}}'docker inspect ktdocker0 --format '{{json .Mounts}}' | python3 -m json.toolRunning a command in the live container
Section titled “Running a command in the live container”docker exec -it ktdocker0 /bin/shdocker exec -it ktdocker0 /rw/bin/cms.sh /finish-installationdocker exec runs inside the already running container, which is what you
want when diagnosing state. The cms service from the Compose file instead
starts a fresh container with the same mounts — use that when the application
container is not running.
Running a one-off container by hand
Section titled “Running a one-off container by hand”The Compose equivalent is docker compose --profile tools run --rm cms ….
docker run --rm -e TZ=Europe/Berlin \ -v "$PWD/rw:/rw" -v "$PWD/rwshared:/rwshared" \ registry.onstackit.cloud/rms/ktdocker:3.24.28 \ /rw/bin/cms.sh /write-secret-fileAdd -it when the command prompts for input, for example
/reset-administrator.
Extracting the SQL files
Section titled “Extracting the SQL files”docker run --rm -v "$PWD/sql:/sql" \ --entrypoint /bin/sh \ registry.onstackit.cloud/rms/ktdocker:3.24.28 -c \ 'cp /ro/xin/sql/pg.sql /sql/pg.sql && cp /ro/xin/sql/pg-fun/header.sql /sql/header.sql'Starting the application without Compose
Section titled “Starting the application without Compose”docker run -d --name ktdocker0 --restart unless-stopped \ -e TZ=Europe/Berlin \ -p 8080:8080 \ -v "$PWD/rw:/rw" -v "$PWD/rwshared:/rwshared" \ registry.onstackit.cloud/rms/ktdocker:3.24.28This is what the ktdocker service in the Compose file expands to, minus the
health check and the log limits.
Named volumes instead of bind mounts
Section titled “Named volumes instead of bind mounts”Older installations used named Docker volumes (ktdocker0rw,
ktdocker0rwshared) instead of the rw/ and rwshared/ directories. To
inspect such an installation:
docker volume lsdocker volume inspect ktdocker0rw # shows the Mountpoint on the host
# read a file out of a named volume without rootdocker run --rm -v ktdocker0rw:/rw alpine cat /rw/ktbs.clTo migrate a named volume to the bind-mount layout of this guide, copy its contents out while nothing is running:
docker compose down
docker run --rm -v ktdocker0rw:/from -v "$PWD/rw:/to" alpine \ sh -c 'cd /from && tar cf - . | (cd /to && tar xf -)'docker run --rm -v ktdocker0rwshared:/from -v "$PWD/rwshared:/to" alpine \ sh -c 'cd /from && tar cf - . | (cd /to && tar xf -)'
sudo chown -R 1234:1234 rw rwshareddocker compose up -dVerify the instance works before deleting the old volumes.
Image and license version
Section titled “Image and license version”docker image inspect registry.onstackit.cloud/rms/ktdocker:3.24.28 \ --format '{{.Architecture}}/{{.Os}} {{.Id}}'
grep ':VERSION' *.clAn image tagged 3.24.x requires a license with :VERSION 3240. The
architecture must be amd64.