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

相关推荐
QYR-分析1 小时前
注塑机机械手自动化装备行业发展研判:存量升级催生增量红利,2032 年市场规模逼近 9 亿美元
运维·自动化
牢姐与蒯2 小时前
Linux基本指令及知识点(二)
linux·运维·服务器
ᥬ 小月亮2 小时前
SonarQube使用教程(Docker安装)
运维·docker·容器
去伪存真20252 小时前
数字样机、态势推演与3D汇报场景下的平台选型对比
运维·服务器
自动化测试行业观察3 小时前
从“自动化”到“智能化”:TestMan AI测试平台引领软件测试范式转移
运维·自动化测试·人工智能·测试工具·自动化·app测试·移动应用测试
xiaoxiangsiyan3 小时前
运维之前端反调试学习
运维·前端·学习·状态模式
RisunJan3 小时前
Linux命令-spell(Unix 拼写检查工具 —— 文本校对的基础利器)
linux·运维·unix
深圳市恒星物联科技有限公司4 小时前
破解复杂水务监测难题:投入式压力液位计如何实现“零中断”长效运维?
运维·物联网·智慧城市
自律最差的编程狗4 小时前
从零搭建:VMware + Ubuntu + Docker + MySQL 完整指南
mysql·ubuntu·docker
RPA机器人就用八爪鱼4 小时前
八爪鱼RPA客服质检自动化:会话记录采集与关键词分析方案
运维·自动化·rpa