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

Docker 安装使用

1. 下载

        下载地址:Index of linux/static/stable/x86_64/

下载好后,将文件docker-18.06.3-ce.tgz用WinSCP等工具,上传到不能外网的linux系统服务器

2. 安装

解压后的文件夹docker中文件如下所示:

将docker中的全部文件,使用下边命令,复制到/usr/bin

cp ./docker/* /usr/bin
创建docker.service文件
cd /etc/systemd/system/
touch docker.service
编辑docker.service文件

注意,将其中的ip地址,改成您的服务器地址,其它参数不用改。

--insecure-registry=192.168.205.230

[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 --selinux-enabled=false --insecure-registry=192.168.205.230
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
添加可执行权限
chmod +x docker.service
加载docker.service (注意,若修改了docker.service文件,则要重新加载该文件)
systemctl daemon-reload
启动docker
systemctl status docker
查看docker

设置开机自启动
systemctl enable docker.service

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

相关文章:

  • Linux Docker配置镜像加速
  • 了解CSS Typed OM
  • [ 钓鱼实战系列-基础篇-6 ] 一篇文章让你了解邮件服务器机制(SMTP/POP/IMAP)-2
  • 在 Docker 中搭建 PostgreSQL16 主从同步环境
  • SpringCloud无介绍快使用,sentinel服务熔断功能与持久化(二十四)
  • 判断浏览器环境,前端打开微信浏览器
  • 【算法笔记】前缀和算法原理深度剖析(超全详细版)
  • linux之网络子系统- 地址解析协议arp 源码分析和邻居通用框架
  • 经典动态规划问题:含手续费的股票买卖【从 O(n) 到 O(1) 的优化解析】
  • Python画笔案例-088 绘制 滚动的汉字
  • Redis 5.0 安装配置(Windows)
  • 金融行业:办公安全防护专属攻略
  • python如何基于numpy pandas完成复杂的数据分析操作?
  • Linux中定时任务调度工具——crontab
  • 思维+差分,CF 1884C - Medium Design
  • 简单介绍冯诺依曼体系
  • kernel32.dll下载地址:如何安全地恢复系统文件
  • 【高等数学】多元微分学 (一)
  • Python爬取京东商品信息,详细讲解,手把手教学(附源码)
  • 大家有没有了解过TLKS-PLGS这款接地电阻在线监测装置?它在电力系统中能发挥什么作用呢?
  • Shell中的函数
  • 通过IP地址或者主机名添加打印机20241023
  • 基于SpringBoot+Vue智慧养老关爱系统【提供源码+答辩PPT+参考文档+项目部署】
  • 新手教学系列——利用短效代理快速搭建代理池
  • 实体与DTO如何转换
  • Docker 安装Postgres和PostGIS,并制作镜像
  • ES6:let和const命令解读以及变量的解构赋值
  • java-collection集合整理0.9.4
  • ParallelsDesktop20最新版本虚拟机 一键切换系统 游戏娱乐两不误
  • 现代C语言:C23标准重大更新