Upgrading the HCL Compass Docker image and container
The best way to update an existing container with the newest image is to download the latest image and launch a new container with the same configuration. This quick start guide will help you update your container with the newest HCL Compass Docker image.
Before you begin
Note: Using HCL Compass on Docker and Docker Compose is
not supported when deployed in a production environment. To use HCL Compass in a container in a production
environment, deploy HCL Compass to a
Kubernetes environment.
For more information, see Deploying HCL Compass on SoFy Sandbox.
Procedure
-
Check your current version of the HCL Compass Docker image.
Verify that you have an outdated image by listing the images on your system. The output displays the hcl-compass downloaded image and its tag. The tag is the version number of the image.
$ docker images | grep [docker_image]
-
Pull the HCL Compass container
image by using the the
docker pull
command.docker pull [docker_image]
-
Remove the old container and volume.
- Find the name of the running container with the outdated image by listing the
containers on the
system.
$ docker ps -a | grep [container_name]
- Remove the existing container so that you can launch a new one under the same
name.
$ docker stop [container_id] $ docker rm [container_id]
- Optionally, delete the
volume.
$ docker volume inspect [volume name]
- Recreate the container with the
docker run
command and the desired configuration, using the updated Docker image. To ensure that the previously used container and the new container have the same content, make sure to mount a Docker volume that was assigned to the previously used container. - Ensure that the hcl-compass
container has been updated with the latest Docker image by listing the
containers.
$ docker ps -a | grep [container_name]
- Find the name of the running container with the outdated image by listing the
containers on the
system.