How to install Docker on CentOS7
跳到导航
跳到搜索
- Install
yum-utils
, which provides theyum-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 thehello-world
image
sudo systemctl start docker
sudo docker run hello-world