Causes and Solutions of Startup error of docker Container
Docker container startup error how to see? We will inevitably encounter some problems in the process of using docker containers. Common problems can be grouped into the following categories.
Application failure: The application execution state is inconsistent with expectations;
Container failure: Unable to create, stop, update containers correctly, etc.;
Cluster failure: cluster creation failure, update failure, unable to connect, etc.
For beginners, a common problem is that Docker containers quit automatically after starting, and docker logs have no special output. If the container startup parameter contains "-restart=always" or "-restart", it will restart continuously.
The common cause of this problem is that the PID1 process (initialization process) of the container is not a long-running process, or it starts a background process and exits. Since the Kubernetes Engine runs containers in "detach" mode, this will cause the entire container to exit when the PID1 process ends.
For example, a user wants to start an Ubuntu image.
Since the default Ubuntu mirroring command is "/bin/bash" which automatically exits after execution, we need to change the "command" in the service to/bin/sh -c "while true; do sleep 10; done" in the "more settings" loop; to keep the container running.
It is recommended that users set correct CMD or Entrypoint parameters in Docker image Dockerfile to ensure correct execution of containers.
Container Cloud is realized by deploying Kubernetes Engine on cluster server through docker technology. It is powerful and easy to use. It has tens of thousands of Linux images, which can easily be used as cluster service and freely and easily set up Private Cloud.
Cost-effective container cloud product link https://www.yisu.com/cloud/
container/