上传者: 36360289
|
上传时间: 2022-04-24 14:36:22
|
文件大小: 682KB
|
文件类型: DOCX
安装docker-ce
# 安装docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
yum install -y docker-ce
# 编辑systemctl的Docker启动文件
sed -i "13i ExecStartPost=/usr/sbin/iptables -P FORWARD ACCEPT" /usr/lib/systemd/system/docker.service
# 启动docker
systemctl daemon-reload
systemctl enable docker
systemctl start docker