1.docker安装环境准备
--yum镜像源切换成阿里镜像
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
--添加阿里docker-ce安装镜像
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
--安装docker
yum -y install docker-ce
--容器镜像加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://ftqisfrf.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
2.docker 镜像操作
docker images -q (--quiet) //获取镜像ID集
docker image save 5d0da3dc9764 > centos_local.zip //导出镜像到本地
docker image load < centos_local.zip //从本地加载镜像
标签:--,repo,etc,yum,镜像,操作,docker From: https://www.cnblogs.com/cyhj/p/17790134.html