by Devin Yang
(This article was automatically translated.)

Published - 8 years ago ( Updated - 8 years ago )

foreword

How to archive the docker image into a tar file and load back the docker image.
We can use docker save and docker load.

Proceed as follows:

1. For example, I have the following images.
save images
2. I want to save the deviny/fpm:7.1.9 image, so I can docker save Execute the following command:
(When 7.1.9 is not specified, there will be all images)
docker save
3. If you want to restore, you can use docker load instruction:
docker load
when we execute docker images Check it out, and you can see that the image is back.

Tags: docker

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


fastapi,phpenv,docker

How do I create a fastapi runtime environment with phpenv

phpenv php laravel runs HAProxy, and automatically applies for and updates free certification, now let him run Python's fastapi. There is no limit to phpenv, the limit is your idea.😆

docker,phpenv

Unable to ping host.docker.internal on Linux

You can check with docker version, confirm that the version is Docker v20.10+, you can add extra_hosts as follows:

docker,cli

Docker container formatted display

I think if you want to write some automation functions, it may be useful to be able to format the output container content. The following are some reference examples of Docker container formatting and display instructions