Home  >  Article  >  Operation and Maintenance  >  Centos cannot start docker solution

Centos cannot start docker solution

尚
Original
2020-03-31 14:28:134142browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn