Docker离线安装

  1. 下载二进制包
    https://download.docker.com/linux/static/stable/x86_64/

  2. 创建启动文件

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
  1. 解压可执行文件到/usr/bin/

  2. 加载服务

systemctl daemon-reload
systemctl restart docker

Docker离线安装
https://blog.liuzijian.com/post/297e9af8-d588-5483-1668-1f8ab41d979f.html
作者
Liu Zijian
发布于
2024年8月4日
许可协议