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

Docker版本:18.06.1安装

1、操作系统:CentOS 7.5以上

2、Docker版本:18.06.1

1、解压

tar -xvf docker-18.06.1-ce.tgz

2、将解压出来的docker文件内容移动到 /usr/bin/ 目录下

cp docker/* /usr/bin/

3、将docker注册为service

vim /etc/systemd/system/docker.service

将下列配置加到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

4、启动

chmod  +x /etc/systemd/system/docker.service    #添加文件权限并启动docker
systemctl daemon-reload    #重载unit配置文件
systemctl start docker    #启动Docker
systemctl enable docker.service  #设置开机自启

5、验证

systemctl status docker   #查看Docker状态
docker -v   #查看Docker版本
http://www.lryc.cn/news/329211.html

相关文章:

  • 记 SpringBoot 使用@RequestBody 接收不到参数
  • unity 打包安卓错误汇集
  • C语言-文件操作
  • ADB 操作命令详解及用法大全
  • 指针数组。
  • GitHub开源项目权限管理-使用账号和个人令牌访问
  • DevSecOps平台架构系列-亚马逊云AWS DevSecOps平台架构
  • KaTex 常用公式编辑
  • 域攻防渗透之委派攻击
  • 优雅的使用ChromeDriver
  • react native hooks 页面出现重绘问题,如何解决
  • kafka安装并测试
  • flutter路由跳转
  • 微服务项目小结1
  • 【小熊猫 ide】更新支持mingw 支持c++20
  • ESD保护二极管ESD9B3.3ST5G 以更小的空间实现强大的保护 车规级TVS二极管更给力
  • SAP BTP云上一个JVM与DB Connection纠缠的案例
  • Linux进程的基本概念
  • 设计模式深度解析:AI如何影响装饰器模式与组合模式的选择与应用
  • JAVA面试大全之微服务篇
  • WiFiSpoof for Mac wifi地址修改工具
  • 14 - grace数据处理 - 泄露误差改正 - 空域滤波法(Mascon法)
  • openGauss MySQL兼容性增强
  • 【跟小嘉学 Linux 系统架构与开发】二、Linux发型版介绍与基础常用命令介绍
  • EMD关于信号的重建,心率提取
  • HEVC的Profile和Level介绍
  • Springboot Thymeleaf 实现数据添加、修改、查询、删除
  • 关于 UnityEditorWindow
  • 小狐狸JSON-RPC:wallet_addEthereumChain(添加指定链)
  • Pandas | value_counts() 的详细用法