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.

Procedure

  1. 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]
  2. Pull the HCL Compass container image by using the the docker pull command.
    docker pull [docker_image]
  3. Remove the old container and volume.
    1. Find the name of the running container with the outdated image by listing the containers on the system.
      $ docker ps -a | grep [container_name]
    2. Remove the existing container so that you can launch a new one under the same name.
      $ docker stop [container_id]
      $ docker rm [container_id]
    3. Optionally, delete the volume.
      $ docker volume inspect [volume name]
    4. 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.
    5. Ensure that the hcl-compass container has been updated with the latest Docker image by listing the containers.
      $ docker ps -a | grep [container_name]