Updating a TrueCommand Docker Container
3 minute read
Updating TrueCommand installed in a Docker container requires stopping the existing container, obtaining the latest software image from the ixsystems/truecommand hub, and starting an updated container using the preexisting TrueCommand storage volume.
This article shows how to do this using the command line, but different container management applications can be used to accomplish the same task. Log in to the Docker host system for the container update process.
On Linux systems,
dockercommands need to be run as the root account. You might need to add
sudoin front of the example command to run the command as root:
sudo docker image pull ixsystems/truecommand.
To view all active containers, enter
joe@joe-minty:~$ sudo docker ps [sudo] password for joe: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d595961d9024 ixsystems/truecommand:latest "/start.sh" 15 minutes ago Up 15 minutes 443/tcp, 0.0.0.0:8080->80/tcp TrueCmd_contained
For the rest of the examples in this article, we’ll be referring to
TrueCmd_contained for the container name.
Be sure to replace this with your TrueCommand container name.
You will also need to note the path to the volume that the container uses for your TrueCommand configuration. You’ll need to use this volume when starting the updated Docker container to continue using your existing TrueCommand configuration.
Docker Container Commands
There are a few general Docker commands to remember when interacting with a TrueCommand container:
To start or stop the TrueCommand container, enter
docker start <container name> or
docker stop <container name> on the Docker host system.
To have the container automatically start when the Docker host system boots, ensure that the Docker daemon is configured to run at system boot and add the
--restart flag to the initial
docker run command:
docker run --name=<the name to call the container> -v=”<local directory>:/data” -p <host port>:80 sslport <host port>:443 --detach --restart ixsystems/truecommand:latest
For a full history of every container that the host has run, use
docker ps -a:
joe@joe-minty:~$ sudo docker ps -a [sudo] password for joe: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d595961d9024 ixsystems/truecommand:latest "/start.sh" 15 minutes ago Up 15 minutes 443/tcp, 0.0.0.0:8080->80/tcp TrueCmd_contained 214a0275a216 phpmyadmin/phpmyadmin "/docker-entrypoint.…" 7 weeks ago Exited (0) 11 days ago phpmyadmin 0a68db912cce phpwork "docker-php-entrypoi…" 4 months ago Exited (0) 11 days ago phpwork_1 d0ae8d0a839f mysql:5.7 "docker-entrypoint.s…" 4 months ago Exited (0) 11 days ago phpwork_mySQL_1
To update, download the latest TrueCommand image and remove the existing TrueCommand container. Then restart the container using the latest TrueCommand image and preexisting TrueCommand storage volume.
To remove the existing container, enter
docker rm TrueCmd_contained.
docker image pull ixsystems/truecommand.
By default, the latest image of TrueCommand is pulled to the Docker host.
Start a new container that uses the new image, but make sure to use the preexisting volume that was being used for the original TrueCommand container:
docker run --name <the name to call the container> -v ”<local host directory>:/data” -p <host port>:80 sslport <host port>:443 --detach ixsystems/truecommand:latest
Example without https:
sudo docker run --name TrueCmd_contained -v "/home/joe/Documents/TrueCommandContainer:/data" -p 8080:80 -d ixsystems/truecommand:latest
When the container is created, Docker will use the image previously downloaded with
A page refresh might be required to view the changes, but previous settings and systems remain available due to the volume reference.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.