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

相关推荐
阿拉斯攀登1 天前
Kubernetes(K8s)全面解析:核心概念、架构与实践
docker·云原生·容器·kubernetes·k8s
杭州泽沃电子科技有限公司1 天前
煤化工精炼与加工环节的监测:智能平台如何保障最终产品价值与环保合规?
运维·科技
Radan小哥1 天前
Docker学习笔记—day011
笔记·学习·docker
可可苏饼干1 天前
Ruo-Yi 前后端分离
运维·学习
SUPER52661 天前
运维hbase服务重启,导致应用查询异常 hbase:meta
运维·数据库·hbase
_w_z_j_1 天前
Linux----信号(产生、保存、处理)
linux·运维·服务器
专家大圣1 天前
远程调式不复杂!内网服务器调试用对工具很简单
运维·服务器·网络·内网穿透·cpolar
gs801401 天前
Ascend 服务器是什么?(Ascend Server / 昇腾服务器)
运维·服务器·人工智能
Zhijun.li@Studio1 天前
【Docker实战】在容器内配置 SSH 服务:安装、Vim配置与连接验证(保姆级教程)
docker·ssh·vim
了一梨1 天前
使用Docker配置适配泰山派的交叉编译环境
linux·docker