【Linux】通过二进制文件安装docker-24.0.2

说明

本教程测试环境为debian9,其他环境中可能会出现报错或安装失败的问题

下载

wget https://download.docker.com/linux/static/stable/x86_64/docker-24.0.2.tgz --no-check-certificate

解压

tar xzvf docker-24.0.2.tgz

复制二进制文件到/usr/bin目录下

cp docker/* /usr/bin/

检查是否安装

docker version

配置 docker.service文件

vim /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

启动dockerd服务进程

systemctl daemon-reload
systemctl start docker.service

检验

ps aux|grep docker

你可能感兴趣的:(linux,docker)