What should I do if docker fails to start the hello-world container?

王林
Release: 2020-05-21 14:58:07
Original
3682 people have browsed it

What should I do if docker fails to start the hello-world container?

Problem description:

The image file hello-world has been captured to the local warehouse, but an error occurred when running the following command to run the image file.

docker container run hello-world
Copy after login

Cause analysis:

Docker uses the overlay2 file system, and the system can only recognize the overlay file system by default.

Solution:

1. Stop the docker service

systemctl stop docker
Copy after login

2. Delete the docker file:

rm -rf /var/lib/docker
Copy after login

This command will delete all image mirrors, it is recommended Back up your files in advance.

3. Edit the file

vi /etc/sysconfig/docker-storage
Copy after login

Modify the contents of the docker-storage file as follows:

What should I do if docker fails to start the hello-world container?

##4. Restart docker

Recommended tutorial:

docker tutorial

The above is the detailed content of What should I do if docker fails to start the hello-world container?. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!