当前位置: 首页 > news >正文

离线安装docker和docker-compose

1.下载

docker

Index of linux/static/stable/x86_64/

docker-compose

Overview of installing Docker Compose | Docker Docs

2.docker

/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=/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
[root@localhost opt]# tar -zxvf docker-23.0.6.tgz 
docker/
docker/docker-proxy
docker/containerd-shim-runc-v2
docker/ctr
docker/docker
docker/docker-init
docker/runc
docker/dockerd
docker/containerd
[root@localhost opt]# ls
docker  docker-23.0.6.tgz  docker-compose-linux-x86_64  rh
[root@localhost opt]# cp docker/* /usr/bin/
[root@localhost opt]# cd /
[root@localhost /]# vi /etc/systemd/system/docker.service
[root@localhost /]# chmod +x /etc/systemd/system/docker.service
[root@localhost /]# systemctl daemon-reload
[root@localhost /]# systemctl start docker
[root@localhost /]# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
[root@localhost /]# docker -v
Docker version 23.0.6, build ef23cbc

3.docker-compose

[root@localhost opt]#  mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
[root@localhost opt]# chmod +x /usr/local/bin/docker-compose
[root@localhost opt]# docker-compose -v
Docker Compose version v2.5.0

http://www.lryc.cn/news/277162.html

相关文章:

  • 奇怪的事情记录:外置网卡和外置显示器不兼容
  • 【大数据进阶第三阶段之Hive学习笔记】Hive基础入门
  • 第三代量子计算机交付,中国芯片开辟新道路,光刻机难挡中国芯
  • react native中使用tailwind并配置自动补全
  • 数据分析——火车信息
  • Bert-vits2最终版Bert-vits2-2.3云端训练和推理(Colab免费GPU算力平台)
  • Asp .Net Web应用程序(.Net Framework4.8)网站发布到IIS
  • vue element plus Typography 排版
  • 理论U3 决策树
  • Redis 常用操作
  • c# 使用Null合并操作符例子
  • 【Docker】docker部署conda并激活环境
  • HarmonyOS@Link装饰器:父子双向同步
  • 【idea】idea插件编写教程,博主原创idea插件 欢迎下载
  • 深入理解 Hadoop (四)HDFS源码剖析
  • 【Vue3+React18+TS4】1-1 : 课程介绍与学习指南
  • Nacos与Eureka的区别详解
  • 【算法刷题】Day28
  • 深入了解pnpm:一种高效的包管理工具
  • QEMU源码全解析 —— PCI设备模拟(1)
  • Vue-10、Vue键盘事件
  • 胡圆圆的暑期实习经验分享
  • 基于uniapp封装的table组件
  • Git删除远程仓库某次提交记录后的所有提交
  • 强化学习10——免模型控制Q-learning算法
  • 【数据库】CRUD常用函数UNION 和 UNION ALL
  • Adding Conditional Control to Text-to-Image Diffusion Models——【论文笔记】
  • Python与人工智能
  • 【Docker】Docker基础
  • linux异常情况,排查处理中