Category / Section
How to upgrade a new image in docker environment using docker compose yaml file
Published:
The following steps explain how to upgrade a new image in a Docker environment using a Docker Compose YAML file:
-
Navigate to the location of the Docker Compose deployment file.
-
Back up the
app_data
anddatabase data
from the same volumes you previously used in the current container to avoid any data loss.docker-compose down
-
Replace the new image tag in your Docker Compose file and save the changes. This is applicable for both the single-compose and multi-compose YAML files.
For Single docker-compose yaml file:
For Multi docker-compose yaml file:Note: For multiple containers, you can use the latest image in your deployment YAML for all services such as (id-web, id-api, id-ums, bi-web, bi-api, bi-jobs, and bi-dataservice).
-
Use the following command to start your container with the new image tag.
docker-compose up -d