Centos cannot start docker solution

Release: 2020-03-31 14:28:13
Original
4134 people have browsed it

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
Copy after login

You need to configure the yum source repository before installing docker-engine

vi  /etc/yum.repos.d/docker.repo
Copy after login

[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
Copy after login

Solution two:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Copy after login

Start as a non-root user, you need to add your user to the "docker" group

sudo usermod -aG docker your-user
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template