Home > Article > Operation and Maintenance > Centos cannot start docker solution
centos cannot start docker:
Cause: version problem, uninstall the old version of docker first
Solution 1:
Uninstall the installed docker and reinstall a different version of docker.
yum remove docker yum remove docker-selinux
You need to configure the yum source repository before installing docker-engine
vi /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https ://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum. dockerproject.org/gpg
yum install docker-engine
Solution two:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
Start as a non-root user, you need to add your user to the "docker" group
sudo usermod -aG docker your-user
Normal After the user joins the docker group, he needs to log in again for it to take effect!
Recommended tutorial: centos tutorial
The above is the detailed content of Centos cannot start docker solution. For more information, please follow other related articles on the PHP Chinese website!