Using yum mounting Docker (7 under the CentOS)

Using yum installation (CentOS 7 below)

Docker system requirements CentOS kernel version higher than 3.10, see this page prerequisite to verify your CentOS version supports Docker.

By uname -r to see your current kernel version command  

[root@runoob ~]# uname -r 

Installation Docker

From March 2017 began docker is divided into two branches on the basis of the original version: Docker CE and Docker EE.

Docker CE community that is free version, Docker EE namely Enterprise Edition, emphasis on security, but need to pay to use.

This article describes the installation Docker CE.

Remove the old version:

$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine

Install some necessary system tools:

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

Add the software source information:

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Update yum cache:

sudo yum makecache fast

Installation Docker-ce:

sudo yum -y install docker-ce

Docker start background service

sudo systemctl start docker

Hello-world test run

[root@runoob ~]# docker run hello-world

Guess you like

Origin www.cnblogs.com/xiexun/p/11208833.html