How to solve the Docker container startup failure

How to solve the Docker container startup failure

Question: After the computer restarts, the mysql container in docker cannot be restarted. I don’t know why

The above steps: If sudo docker start name can restart, that is, enter: docker ps and you can see that the service you need is already started, then you don’t need to do the following steps. If it’s just like the above, then continue reading below:

Solution: Delete the container that cannot be started, and then run the image again.

Note that the container name has changed to mysql at this time, and it is in a closed state. It still cannot run when running the image again, but it can be started when starting the image again.

Supplementary content

1. View the mount points occupied by Docker

cat /proc/mounts | grep "mapper/docker" | awk '{print $2}'

2. Manually unmount the occupied mount point

3. Restart

docker ps -aq | xargs -I {} docker start {}

This is the end of this article on how to solve the problem of docker container startup failure. For more information about solutions to docker container startup failure, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solution to the failure of entering the container due to full docker space
  • Solve the problem that some configuration files in /etc are reset after the docker container is restarted
  • Docker View the Mount Directory Operation of the Container
  • docker run -v mounts data volumes abnormally, and the container status is always restarting

<<:  A Brief Analysis on the Time Carrying Problem of MySQL

>>:  JavaScript implements the nine-grid mobile puzzle game

Recommend

Tutorial on installing MySQL 5.7.9 using RPM package under CentOS 7

Recorded MySQL 5.7.9 installation tutorial, share...

Detailed explanation of MySQL date string timestamp conversion

The conversion between time, string and timestamp...

How to choose and use PNG, JPG, and GIF as web image formats

So which one of these formats, GIF, PNG, and JPG,...

JS version of the picture magnifying glass effect

This article shares the specific code of JS to ac...

Tips on making web pages for mobile phones

Considering that many people now use smartphones, ...

9 great JavaScript framework scripts for drawing charts on the web

9 great JavaScript framework scripts for drawing ...

6 interesting tips for setting CSS background images

Background-image is probably one of those CSS pro...

Solution to the horizontal scroll bar in iframe under IE6

The situation is as follows: (PS: The red box repr...

Understand the basics of Navicat for MySQL in one article

Table of contents 1. Database Operation 2. Data T...

Methods and steps for deploying GitLab environment based on Docker

Note: It is recommended that the virtual machine ...

In-depth study of JavaScript array deduplication problem

Table of contents Preface 👀 Start researching 🐱‍🏍...

mysql implements the operation of setting multiple primary keys

User table, ID number must be unique, mobile phon...