Update images used by docker-compose services
Posted: | Updated: | Tags: docker tilUpdating images for containers that are run through docker-compose is simple. Include the appropriate tags for the image value.
docker-compose pull
docker-compose up -d
You can then delete the old, now untagged image. The following command deletes all untagged images.
docker image prune
Rollback to a previous image
If you wish to rollback to the previous image, first tag the old image.
docker tag <IMAGE ID> <REPOSITORY>:<TAG>
Replace the image value in the compose file with the new <TAG>
and recreate the service.
docker-compose up -d