Docker Getting Started Installation

A precondition

This article describes the installation Docker CE.

Currently, CentOS kernel supports only the release of Docker.

Docker running on CentOS 7, the system of claim 64, kernel version 3.10 or more.

Docker running on CentOS-6.5 or higher version of the CentOS, it requires 64-bit system, or kernel version 2.6.32-431 later.

1, use the command unanme -r core edition.

2, if previously installed, you need to uninstall 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

 

Second, the installation Docker

1, is centos login as root

2, to ensure that the yum package up to date.

yum -y update

3, install some necessary system tools:

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

4, add the software source information:

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

5, update yum cache:

sudo yum makecache fast

6, you can view all versions of the warehouse docker, and select a specific version is installed

 

yum list docker-ce --showduplicates | sort -r

7, install Docker-ce: As the repo by default open only stable warehouses here to install the latest stable version

sudo yum -y install docker-ce

8, start the background service and added Docker boot

sudo systemctl start docker
systemctl enable docker

9, verify that the installation was successful (there are two parts, client service and installation start indicate docker had been successful)

docker version

10, Ali mirroring accelerate

Details Reference: https://cr.console.aliyun.com/cn-hangzhou/mirrors

 

Guess you like

Origin www.cnblogs.com/kevin-ying/p/11106265.html