美文网首页
linux 安装docker

linux 安装docker

作者: 东_11f3 | 来源:发表于2019-08-21 15:46 被阅读0次

wget http://mirrors.aliyun.com/repo/Centos-7.repo -O /etc/yum.repos.d/CentOS-Base.repo
wget http://mirrors.aliyun.com/repo/epel-7.repo -O /etc/yum.repos.d/epel.repo
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo

yum install docker-ce -y

mkdir -p /etc/docker
cat > /etc/docker/daemon.json <<EOF
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF

systemctl daemon-reload ; systemctl enable docker && systemctl start docker

相关文章

网友评论

      本文标题:linux 安装docker

      本文链接:https://www.haomeiwen.com/subject/cntrdctx.html