Docker installed on the Centos7

  1. 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:
Here Insert Picture Description

  1. Installation package needed
yum install -y yum-utils device-mapper-persistent-data lvm2

Here Insert Picture Description

  1. Setting the stability of warehouse
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Here Insert Picture Description

  1. 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
  1. Or using the following command to list the available versions, and then choose to install
 yum list docker-ce --showduplicates | sort -r

Here Insert Picture Description

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
Here Insert Picture Description

7. Try to start next docker

systemctl start docker

Here Insert Picture Description
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.

  1. Finally, under docker really confirm whether the installation was successful
docker version

Here Insert Picture Description
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.

Published 289 original articles · won praise 302 · views 50000 +

Guess you like

Origin blog.csdn.net/weixin_38106322/article/details/105017138
Recommended