# 查看系统版本
cat /etc/os-release
# 查看 Linux 内核版本(3.10以上)
uname -r
# 查看 iptabls 版本(1.4以上)
iptables --version
# 判断处理器架构
uname -p
# 在此下载
https://download.docker.com/linux/static/stable/
# 解压文件
tar -zxvf docker-23.0.1.tgz
# 移动到安装目录
mv docker/* /usr/bin/
# 测试运行(Ctrl+C 退出)
dockerd
# 添加系统服务
vi /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
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
# 启动 docker 服务
systemctl start docker
# 设置开机自启
systemctl enable docker
# 查看 docker 版本
docker -v
参考链接:https://www.cnblogs.com/xwgli/p/17150149.html
标签:bin,target,v10,离线,systemctl,usr,https,docker From: https://www.cnblogs.com/zxpyun/p/17486172.html