Install Docker on CentOS7

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
installs the required packages

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
setup stable repository

sudo yum install docker-ce
Install the latest version of Docker CE (Community Edition)
Press Y twice to confirm

sudo systemctl start docker
启动Docker

sudo docker run hello-world
Verify that the installation is correct by running the hello-world image

docker versionView
docker version

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325050649&siteId=291194637