How to install Docker on CentOS7

来自koorka知识分享
跳转至: 导航搜索
  • Install yum-utils, which provides the yum-config-manager utility
 sudo yum install -y yum-utils
Use the following command to set up the stable repository:
sudo yum-config-manager --add-repo https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo

# Disable the testing repository
sudo yum-config-manager --disable docker-testing
  • Install Docker
sudo yum -y install docker-engine
  • Verify that docker is installed correctly by running the hello-world image
sudo systemctl start docker
sudo docker run hello-world