运维开发网

docker-ce快速部署

运维开发网 https://www.qedev.com 2020-06-11 18:10 出处:网络 作者:运维开发网整理
配置yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo wget -O /etc/yum.repos.d/doc

配置yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/Linux/centos/docker-ce.repo

yum list docker-ce.x86_64 --showduplicates | sort -r

yum install docker-ce -y

cat >> /etc/sysctl.conf<<end

net.ipv4.ip_forward = 1

net.bridge.bridge-nf-call-iptables = 1

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-arptables = 1

end

systemctl start docker

systemctl enable docker

systemctl status docker

 

cat >>/etc/docker/daemon.json<<end

{

  "registry-mirrors": ["https://registry.docker-cn.com"]

}

end

systemctl reload dockersystemctl status docker

0

精彩评论

暂无评论...
验证码 换一张
取 消