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

相关推荐
办公室马主任18 分钟前
华南机械加工企业选MES服务商怎么选?
大数据·运维·人工智能·制造
小陈同学!!1 小时前
防火墙双机热备实验
运维·服务器
三言老师1 小时前
CentOS8 Firewalld 高级规则中级实操教程
linux·运维·服务器·网络·centos
Promise微笑1 小时前
露点仪:康高特朝露(冷镜)vs 进口密析尔 、肖氏,怎么选?
运维
云贝贝贝3 小时前
OceanBase认证体系介绍与备考指南
运维·服务器·oceanbase·1024程序员节
tedcloud1233 小时前
Impeccable 部署指南:开源前端设计工具 Linux 环境搭建实践
linux·运维·服务器·前端·人工智能·开源
风曦Kisaki3 小时前
# Kubernetes(K8s)笔记Day12 :K8s 七层代理(Ingress 和 Ingress Controller)
linux·笔记·云原生·容器·kubernetes
Lyra_Infra3 小时前
Docker OCI Runtime 启动失败问题排查与解决
后端·docker·架构
保卫大狮兄3 小时前
设备利用率低,到底是设备问题还是排产问题?
大数据·运维·服务器
独行侠影a4 小时前
6G研发加速:太赫兹通信与智能超表面如何重塑未来网络?
运维·服务器