While trying to test recovery of a service from a backup, as everyone should, I discovered a container image was no longer available from Docker Hub anymore. I was greeted by the following error:
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing. Continue with the new image? [yN] Since I had a perfectly healthy and running instance of the service on my homelab which I could use to save the image from that I could then include in my backup copy.
Read more...
Docker
Updating 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.
Read more...