How to back up and restore a Docker Image

There are occasions when you want to take a snapshot of your existing local docker images, for example, you might have a running version locally and there is a newer version you want to test and then easily revert back to your current running version. Running a docker compose pull will update your existing image. Remember to include any prefix and version postfix.

docker save image-name:{version} > c:/backup/image-name.tar

If you backed up your images to a local tar file, to restore previously saved images run:

docker image load -i c:/backup/image-name.tar

Useful Links

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s