Learning image management docker 2-

docker manage
the default image source docker's: hub.docker.com
modify docker domestic warehouse Mirror:
vim /etc/docker/daemon.json
{
"Registry-Mirrors": [ "https://registry.docker-cn.com" ]
}
or
{
"Registry-mirrors": [ "http://hub-mirror.c.163.com"]
}
or
// aliyun mirror configured to use the accelerator
the sudo mkdir -p / etc / Docker
the sudo TEE / etc / Docker / daemon.json << - 'the EOF'
{
"Registry-Mirrors": [ "https://md4nbj2f.mirror.aliyuncs.com"]
}
the EOF

// reload the configuration file
sudo systemctl daemon-reload

// 重启docker
sudo systemctl restart docker

systemctl restart docker

docker images to view local mirror
download mirror
docker pull nginx
listed Mirror:
Docker Image LS

View historical stratification
docker image history nginx
View details docker
docker image inspect nginx
download mirrors
docker image pull nginx
push mirroring
docker image push
to remove the mirror
dicker rm
to the mirror marking
docker tag was originally called the new name
to save image to local
docker image save image-name > name.tar
load local image
docker load <name.tar
export run container
docker image export
import container
docker image import

Guess you like

Origin www.cnblogs.com/hlc-123/p/11921579.html