ctyunos上部署docker的方法步骤如下:
1、上传ctyunos docker压缩包 docker-20.10.14.tgz 至 /data 并解压docker
[root@dev ~]cd /data && tar -xzvf docker*.tgz
2、将docker 相关命令拷贝到 /usr/bin
[root@dev ~]cp docker/* /usr/bin/
3、docker注册成系统服务
[root@dev ~]vim /etc/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=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
4、添加执行权限
[root@dev ~]chmod 755 /etc/systemd/system/docker.service
5、重新加载配置文件
[root@dev ~]systemctl daemon-reload
6、启动docker和设置开机启动
[root@dev ~]systemctl start docker && systemctl enable docker.service
7、查看服务和docker版本
[root@dev ~]systemctl status docker && docker -v