离线安装docker

离线安装docker

1、docker下载

复制代码
https://download.docker.com/linux/static/stable/

所有版本都有,根据你的需求去选择。我这里下载的docker版本号是20.10.23

复制代码
# wget  https://download.docker.com/linux/static/stable/x86_64/docker-20.10.23.tgz

2、解压

复制代码
# tar zxvf docker-20.10.23.tgz # cp docker/* /usr/bin/

3、创建服务文件

复制代码
# 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 ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=127.0.0.1 ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity TimeoutStartSec=0 Delegate=yes KillMode=process Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target

4、启动​​​​​​​

复制代码
chmod +x /etc/systemd/system/docker.servicesystemctl daemon-reloadsystemctl start dockersystemctl enable dockerdocker --version# Docker version 20.10.23, build 7155243

5、配置加速器加速下载docker镜像​​​​​​​

复制代码
vim /etc/docker/daemon.json{"registry-mirrors": ["https://gg3gwnry.mirror.aliyuncs.com"]}重启服务:systemctl daemon-reloadsystemctl restart docker
相关推荐
xbzb4 小时前
镜像到底存在哪:/var/lib/docker 的四级映射与 daemon.json 配置
docker·容器·json·镜像·daemon.json·四级
Alluxio6 小时前
Alluxio + OCI:为 AI 工作负载实现亚毫秒访问延迟与可扩展吞吐
运维·数据库·人工智能·分布式·缓存·ai·语言模型
Sayai10 小时前
Neo4j 图数据质量检查实战:环路检测、孤立节点与连通分量,两条 Cypher 引出的数据体检清单(含变长路径性能陷阱)
运维·neo4j·图数据库·数据质量·cypher
Elastic 中国社区官方博客11 小时前
更少的位数,相同的召回率:DiskBBQ 更保守的自动校准扫描
大数据·运维·开发语言·人工智能·elasticsearch·搜索引擎
方便面不加香菜11 小时前
Docker Volume -- 管理卷Volume详解
运维·docker·容器
沫璃染墨12 小时前
从零入门计算机网络系列(十八):TCP连接管理详解——从三次握手与四次挥手到TIME_WAIT机制
运维·服务器·网络·c++·网络协议·tcp/ip·tcp
Felven12 小时前
华为鲲鹏920s芯片serdestool工具使用说明
linux·运维·服务器·华为·鲲鹏920·serdestool
江湖有缘12 小时前
Docker实战 | 使用Docker部署lemonitor镜像站点列表程序
运维·docker·容器
莫晓燚12 小时前
mall 电商项目完整部署---实战
linux·运维·docker·容器
爱和冰阔落13 小时前
【Linux网络】JsonCpp 怎么实现序列化?从 Request/Response 到网络计算器消息设计
linux·运维·网络·php