Kylin 麒麟v10 sp1 服务器版 离线安装docker的方法
tar -zxvf docker-20.10.16.tgz
mv docker/* /usr/bin/
vi /usr/lib/systemd/system/docker.service
1、编辑docker的系统服务文件
vi /usr/lib/systemd/system/docker.service
2、将下面的内容复制到刚创建的docker.service文件中
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
chmod +x /usr/lib/systemd/system/docker.service
systemctl daemon-reload
vi /etc/docker/daemon.json
——————————————————————————————
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"exec-opts": ["native.cgroupdriver=systemd"]
}
——————————————————————————————————
systemctl daemon-reload
systemctl start docker
systemctl enable docker
docker -v
////////////////////////////////
////////Sixi. Let it be.../////
//////////////////////////////