docker save and load mirroring

2, save the image
after our mirrors do a good job, we have to save up for backup use, how to do? Use docker save command to save the image locally.

[root @ rocketmq-nameserver4 dev] # docker save -o rocketmq.tar rocketmq ## - o: Specifies the name of the saved mirror; rocketmq.tar: save to a local image name; rocketmq: image name, by "docker images" View 
[root @ rocketmq-nameserver4 dev] # ll


rocketmq.tar to just save the image

3, load the image
we have a local image file, you can use docker load when needed to save a local mirror of the reimport docker.
docker load --input rocketmq.tar or docker load <rocketmq.tar

4, remove a mirror
and some outdated image, we need to remove. Using the following command: docker rmi -f image_id ## - f : represents the force delete mirror; image_id: Mirror id

 

Guess you like

Origin www.cnblogs.com/linuxws/p/11981424.html