1查看系统版本
- [root@web-0001 ~]# cat /etc/os-release
- NAME="Kylin Linux Advanced Server"
- VERSION="V10 (Tercel)"
- ID="kylin"
- VERSION_ID="V10"
- PRETTY_NAME="Kylin Linux Advanced Server V10 (Tercel)"
- ANSI_COLOR="0;31"
- [root@web-0001 ~]# cat /etc/kylin-release
- Kylin Linux Advanced Server release V10 (Tercel)
- [root@web-0001 ~]# uname -a
- Linux web-0001.novalocal 4.19.90-23.8.v2101.ky10.aarch64 #1 SMP Mon May 17 17:07:38 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
- [root@web-0001 ~]# iptables --version
- iptables v1.8.1 (legacy)
2下载docker
地址:Index of linux/static/stable/ (docker.com)
版本选择 docker-20.10.9.tgz
3 docker 安装
- tar xf docker-20.10.9.tgz
- mv docker/* /usr/bin/
- #查看版本
- docker --version
- Docker version 20.10.9, build c2ea9bc
4增加服务
- vi docker.service /usr/lib/systemd/system/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 -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
- ExecReload=/bin/kill -s HUP $MAINPID
- LimitNOFILE=infinity
- LimitNPROC=infinity
- LimitCORE=infinity
- TimeoutStartSec=0
- Delegate=yes
- KillMode=process
- Restart=on-failure
- StartLimitBurst=3
- StartLimitInterval=60s
- [Install]
- WantedBy=multi-user.target
- #增加权限
- chmod u+x /usr/lib/systemd/system/docker.service
5启动
- systemctl daemon-reload
- systemctl enable docker
- systemctl start docker