Docker two versions CE (Community Edition Community Edition) and EE (Enterprise Edition Enterprise Edition) from 17.03 after the release.
https://blog.docker.com/2017/03/docker-enterprise-edition/
Here installation CE version.
First, install
Uninstall the old version
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
installation
STEP # . 1 : Some systems tools necessary to install the sudo yum the install -Y yum -utils-persistent- Device-Mapper Data LVM2 # the Step 2 : Add the software source information the sudo yum -config-Manager---add the repo HTTP: // Mirrors .aliyun.com / Docker-CE / Linux / CentOS / Docker-ce.repo # the Step . 3 : update and install docker- the CE the sudo yum makecache FAST the sudo yum -Y the install docker- CE # the Step . 4 : service Docker open the sudo systemctl Start Docker # boot from Kai sudo systemctl enable docker
Install the specified version
# Official repositories enabled by default the latest software, you can get various versions of the software package by editing the source way. For example, the official did not test version of the software source is set to available, you can turn on in the following ways. Similarly you can open various test version. Vim /etc/yum.repos.d/docker-ee.repo # # enabled is below [docker-ce-test] = 0 is modified. 1 = enabled # # install the specified version of the CE-Docker: # the Step. 1: Find Docker-CE version: # yum List Docker-ce.x86_64 --showduplicates | the Sort -r # Loading Mirror SPEEDS from cached hostfile # Loaded plugins: Branch, fastestmirror, the Langpacks # Docker-ce.x86_64 17.03.1.ce-1 Docker-ce-stable .el7.centos # Docker-ce.x86_64 17.03.1.ce-1.el7.centos @ Docker-ce-stable # Docker Docker-ce.x86_64 17.03.0.ce-1.el7.centos -ce-stable # the Available Packages Standard Package # Step2: Install the specified version Docker-CE: (VERSION e.g. above 17.03.0.ce.1-1.el7.centos) # Docker the install the sudo yum -Y-CE- [VERSION]
Installation check
docker version
Second, the switching mirror source
daemon.json configuration instructions: https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
About daemon: https://docs.docker.com/config/daemon/
NetEase, for example, create or modify /etc/docker/daemon.json file (not the default file)
the sudo mkdir -p / etc / Docker the sudo TEE /etc/docker/daemon.json << - ' the EOF ' { " Registry-Mirrors " : [ " https://hub-mirror.c.163.com " ] } the EOF # restart service sudo systemctl daemon- reload sudo systemctl restart Docker # to view the current configuration information Docker info
Other sources
China University of Science and Technology https://docker.mirrors.ustc.edu.cn Ali cloud (registration required) https://cr.console.aliyun.com/ Huawei cloud (registration required) https://mirrors.huaweicloud.com/
test
docker run hello-world
https://docs.docker.com/install/linux/docker-ce/centos/