- If you install an older version of the Docker, uninstall them and related dependencies
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
On my server nature is not installed, so the information is displayed in the following figure:
- Installation package needed
yum install -y yum-utils device-mapper-persistent-data lvm2
- Setting the stability of warehouse
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- You can directly use the following command to install the latest version of the Docker and containerd, but may be unstable
yum install docker-ce docker-ce-cli containerd.io
- Or using the following command to list the available versions, and then choose to install
yum list docker-ce --showduplicates | sort -r
6. Select the installation Docker, the following command:
yum install 软件包名称
Referring to FIG on the theme version, the package is a package name the name of the parameter (docker-ce) plus version string (second column), from the first version string is a colon (:) until the first hyphen (-) intermediate values, such as this is that I chose to install
docker-ce-18.09.6
7. Try to start next docker
systemctl start docker
Because of this there is no local hello-world of mirrors, it will go to the warehouse to pull the last run will be the effect on the graph.
- Finally, under docker really confirm whether the installation was successful
docker version
We can see two parts and Client Service, which docker expressed are successful installation start up.
to sum up
At this point, Docker installed on Centos7 is complete, and it Docker on Centos6 installation process is slightly different than the process without having to remember, is simply make a note of, when you need to install to be a reference.