docker搭建

docker
#安装
uname -r 3.10.0-327.el7.x86_64
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
yum -y install docker-ce
systemctl start docker
systemctl enable docker
#镜像加速
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://pthx0mbz.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
#删除
yum remove docker-ce
rm -rf /var/lib/docker

posted @ 2019-04-03 10:26  自在1990  阅读(94)  评论(0编辑  收藏  举报