How to save and restore docker image as a file

Spread the love

Sometimes need to save docker image as a file, not only to docker registry. It’s a very good option when you don’t want share your image to dockerhub and don’t have own docker image registry.

It’s very easy action – just use command docker save

For example: docker save –output alpine.tar alpine:3.8

where alpine.tar – name for tar archive, alpine:3.8 – docker image name

In result, you have tar archive that can be easy to send over Dropbox, Google Cloud, email or etc.

For restore you can use command:

docker load -i alpine.tar – restore with multiple layers (if exists) or use

Leave a Reply