1.docker rpm包下载地址

# https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

2.下载rpm包

# wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.06.0.ce-3.el7.x86_64.rpm 

3.安装docker

# 下载阿里的docker-ce源
# cd /etc/yum.repos.d/ && wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # yum -y install docker-ce-18.06.0.ce-3.el7.x86_64.rpm

4.镜像加速配置

# mkdir -p /etc/docker/
# cat >/etc/docker/daemon.json<<EOF
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
EOF

5.指定docker目录启动

# vim /usr/lib/systemd/system/docker.service 

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket [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 --graph /home/meisoo/docker --insecure-registry=172.17.29.74 -H fd:// --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=
RestartSec=
Restart=always # Note that StartLimit* options were moved from "Service" to "Unit" in systemd .
# Both the old, and new location are accepted by systemd and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst= # Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd .
# Both the old, and new name are accepted by systemd and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s # 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 # Comment TasksMax if your systemd version does not support it.
# Only systemd and above support this option.
TasksMax=infinity # 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 [Install]
WantedBy=multi-user.target

6.启动docker

systemctl start docker.service

7.查看docker版本

# docker version
Client:
Version: 18.06.-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul ::
OS/Arch: linux/amd64
Experimental: false Server:
Engine:
Version: 18.06.-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul ::
OS/Arch: linux/amd64
Experimental: false

  

最新文章

  1. C# WinForm国际化的简单实现
  2. 分布式数据库的四分结构设计 BCDE
  3. EventBus 优化广播的传播
  4. CSS布局(一)
  5. django rest framework
  6. ubuntu下查看环境变量
  7. undefined reference to libiconv_open&#39;
  8. Android --http请求之HttpURLConnection
  9. (转)数据库SQL优化大总结之 百万级数据库优化方案
  10. MFC中CListCtrl说明
  11. ChatterBot之使用mongodb 03
  12. Spark学习之编程进阶总结(一)
  13. 【C++】VS2015/VS2017连接Mysql数据库教程
  14. IP通信基础学习第二周
  15. Maths | Metropolis-Hastings algorithm
  16. php 注册树(注册模式)
  17. JConsole连接远程linux服务器配置
  18. MATLAB SVM
  19. JAVA常见面试题之Forward和Redirect的区别 (转发和重定向)
  20. 【神仙题】【CF28D】 Don&#39;t fear, DravDe is kind

热门文章

  1. 什么是RMI?
  2. ubuntu16.04没有办法使用CRT,或者SSH工具的解决办法
  3. JavaScript原型 补充
  4. MySQL的安装、启动和基础配置 —— linux版本
  5. ansible部署Tomcat
  6. webpack学习2.3webpack核心概念
  7. 简单学习【1】——打包JS
  8. HYSBZ 1040 骑士 (基环外向树DP)
  9. Linux服务器部署.Net Core笔记:五、安装Nginx
  10. Oracle Proc编程性能优化经验