Docker containers keeps restarting after reboot

 

  • Docker ps and docker-compose ps

  • Docker inspect

  • Docker stop and start

  • Docker logs

The docker ps command gives you the output of the following information:

  • container id

  • image – version of the image

  • command – what process it is running

  • when created

  • status

  • ports

  • names – comment or friendly name

Docker inspect

With the docker inspect command, you can see the volumes that are mounted, the networking, the restart policy, and many other configuration parameters of the container to help with troubleshooting.

Docker stop and docker start

You can if you want to try to stop the container and start the container again, you can issue the command docker stop <container id or name> and then execute docker start <container id or name> to attempt to stop and start the container.

Docker logs

One of the key commands to get to the bottom of why the container is restarting is the docker logs command. You will likely see the low-level error message in the Docker logs causing the container to exit and restart.

Docker compose file





Comments

Popular posts from this blog

Static IP In Linux

Bash Script