Home >Operation and Maintenance >Docker >What should I do if docker fails to start the hello-world container?

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

王林
王林Original
2020-05-21 14:58:073816browse

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

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

2. Delete the docker file:

rm -rf /var/lib/docker

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

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!

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