linux离线安装docker

安装连接参考

docker离线安装部署详细步骤-CSDN博客

(1)安装包下载

根据机器架构选择x86_64或 aarch64 版本的docker安装包

Index of linux/static/stable/

(2)安装包解压

(3)复制文件

将docker中的全部文件,使用以下命令,复制到/usr/bin

cp ./docker/* /usr/bin

(4)创建docker.service文件

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

the default is not to use systemd for cgroups because the delegate issues still

exists and systemd currently does not support the cgroup feature set required

for containers run by docker

ExecStart=/usr/bin/dockerd

ExecReload=/usr/bin/kill -s HUP $MAINPID

Having non-zero Limit*s causes performance problems due to accounting overhead

in the kernel. We recommend using cgroups to do container-local accounting.

LimitNOFILE=infinity

LimitNPROC=infinity

LimitCORE=infinity

Uncomment TasksMax if your systemd version supports it.

Only systemd 226 and above support this version.

#TasksMax=infinity

TimeoutStartSec=0

set delegate yes so that systemd does not reset the cgroups of docker containers

Delegate=yes

kill only the docker process, not all processes in the cgroup

KillMode=process

restart the docker process if it exits prematurely

Restart=on-failure

StartLimitBurst=3

StartLimitInterval=60s

Install

WantedBy=multi-user.target

(5) 添加执行权限

chmod +x docker.service

(6)执行docker检查

加载docker.service

systemctl daemon-reload

启动docker

systemctl start docker

查看docker

systemctl status docker

(7)开机自启动

systemctl enable docker.service

相关推荐
爱喝水的鱼丶8 分钟前
SAP-ABAP:BAdI 上下文数据获取与交互:标准数据读取与修改逻辑实现
运维·性能优化·sap·abap·增强·经验交流·badi
ARM|X86+FPGA工业主板厂家42 分钟前
基于嵌入式 GPU 的智能服务机器人
linux·运维·arm开发·fpga开发·机器人
pt10431 小时前
网络自动化Python课程:Python与Linux密钥和敏感信息管理介绍
运维·自动化
严谨的麻辣烫1 小时前
2026 年静态 IP 为什么重新受到关注?从住宅代理安全问题看固定网络出口
运维·服务器·tcp/ip·网络安全
云智慧AIOps社区1 小时前
2026年智能巡检机器人行业格局:三类厂商阵营、选型维度与产品推荐
运维·人工智能·机器人·巡检机器人
shengchanxian12 小时前
2026年9月服务器装配流水线厂家技术测评:对标国标的硬件评判逻辑
运维·服务器·服务器装配流水线厂家
挨踢诗人2 小时前
金蝶云星空 × 乐企平台 直连数电票集成解决方案(农产品收购发票自动化)
运维·自动化
Acrellea3 小时前
适配新标准!AIM-T500L 助力算力中心 800V 直流系统安全运维
运维·安全·系统安全
楠楠子呀3 小时前
Walink 技术博客:从原理到实战的完整指南
运维·自动化·testlink
小小程序员.¥3 小时前
docker中redis集群配置
docker