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

How to configure MGR single master and multiple slaves in MySQL 8.0.15

1. Introduction MySQL Group Replication (MGR for ...

Nginx location matching rule example

1. Grammar location [=|~|~*|^~|@] /uri/ { ... } 2...

Linux Network System Introduction

Table of contents Network Information Modify the ...

Solutions to the problem of table nesting and border merging

【question】 When the outer table and the inner tab...

Detailed explanation of 10 common HTTP status codes

The HTTP status code is a 3-digit code used to in...

Docker-compose installation db2 database operation

It is troublesome to install the db2 database dir...

MySQL intercepts the sql statement of the string function

1. left(name,4) intercepts the 4 characters on th...

How to change the MySQL database file directory in Ubuntu

Preface The company's Ubuntu server places th...

MySQL 5.7.19 (tar.gz) installation graphic tutorial under Linux

The first tutorial for installing MySQL-5.7.19 ve...

Use of JavaScript sleep function

Table of contents 1.sleep function 2. setTimeout ...

How to quickly clean up billions of data in MySQL database

Today I received a disk alarm exception. The 50G ...

How to specify parameter variables externally in docker

This article mainly introduces how to specify par...

Implementation of MySQL joint index (composite index)

Joint Index The definition of the joint index in ...

Native JavaScript message board

This article shares the specific code of JavaScri...

Jmeter connects to the database process diagram

1. Download the MySQL jdbc driver (mysql-connecto...