1、uninstall old version docker

yum  -y remove  docker-common docker container-selinux docker-selinux docker-engine

Do not worry about the contents inside /var/lib/docker/, all will be preserved.

2、Let’s add the CE repository for docker installation.

wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo

3、Install the latest version of Docker CE using the following command.

yum -y install docker-ce

4、start the Docker service in case if it is not started automatically after the installation

systemctl start docker.service
systemctl enable docker.service

5、Create a group called docker if it does not exist, run the following commands with root privileges.

groupadd docker

6、Add a user that is to be a part of docker group, replace “asdf” with your own username.

useradd asdf

7、Add a user to docker group.

usermod -aG docker asdf

8、FirwallD in CentOS 7 can conflict with Docker; it is recommended to disable the service.

systemctl stop firewalld.service
systemctl disable firewalld.servic

When firewalld is started or restarted it will remove the DOCKER chain from iptables, it prevents Docker from working properly.

If you still want to use Systemd, firewalld is must be started before Docker service. In case if you start or restart firewalld after Docker, you will have to restart the Docker daemon.

That’s All!, You can now start working with Docker.

最新文章

  1. 转:Delphi 6 实用函数
  2. c++实现简单的链表
  3. codeMirror的简单使用,js比较文本差异(标注出增删改)
  4. 在主方法中定义一个大小为50的一维整型数组,数组i名为x,数组中存放着{1,3,5,…,99}输出这个数组中的所有元素,每输出十个换一行
  5. LeetCode Find Peak Element
  6. [转载] tcp那些事1
  7. greenplum学习
  8. js判断是否全是相同的字符串
  9. 教你看懂C++类库函数定义之二---STDMETHOD介绍
  10. 对C# 构造函数的理解
  11. c#获取新浪微博登录cookie
  12. 超简单使用批处理(batch)操作数据库
  13. python 中的%s是什么意思呢?
  14. EBS系统克隆
  15. Python-常用 Linux 命令的基本使用
  16. WebSocket(5)---多人聊天系统
  17. loading data into a table(亲测有效)
  18. 从路由器镜像中提取uImage头信息
  19. IIC时序详解
  20. 爬取w3c课程—Urllib库使用

热门文章

  1. 最简单的方式用上https
  2. RocketMQ-创建MappedFile本地文件
  3. [Algorithm] Fibonacci problem by using Dynamic programming
  4. Win7开机提示group policy client无法登陆怎么办
  5. ionic搜索头部
  6. 3dmax做的模型导入U3d后 当模型靠近摄像机时镂空问题
  7. 算法笔记_092:蓝桥杯练习 c++_ch04_02_修正版(Java)
  8. error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037
  9. Mybatis准备
  10. mysqli常用方法