Steps for docker container exit error code

Steps for docker container exit error code

Sometimes some docker containers exit after a period of execution. In order to find out the reason, check the error code of the docker container exit. The specific steps are as follows:

1. Find the exited container. You can find it in the following two ways:

docker ps --filter "status=exited"

docker ps -a | grep container name

2. Execute the docker inspect container id command to view the exited container information

docker inspect container id, check the State part

The State section shows the status of the container, OOMKilled, ExitCode and other information. The following is a common ExitCode of Docker

  • Exit Code 0 : In many cases, it may just be the normal exit of the program
  • Exit Code 1 : Application startup failed, such as failure to connect to the database at startup, failure to register nacos, etc.
  • Exit Code 137 : The container received a SIGKILL signal. For example, the system killed the container when the container usage was too high. It could also be a Dockerfile problem, where a non-existent file was accessed, such as ENTRYPOINT ["java","-jar","sample.ja"] missing the regexp.
  • Exit Code 139 : The container received a SIGSEGV signal, such as a program accessing memory beyond the bounds, but the running system did not catch the corresponding error. Exit Code 255: An error occurred in the container, but the cause of the error is uncertain. In this case, you can view the container logs through docker logs container id to see if you can find any clues.

PS: Let’s take a look at the errors encountered when creating a docker container

1. Screenshot of the problem

2. Description of the problem This problem is caused by the incompatibility between the Docker version and the system version.

The current system version and docker version are as follows:

3. Problem Solving

The problem can be solved by installing a lower version of docker or a higher version of the system (Centos7.4 or above).

Install the lower version of docker address: https://www.jb51.net/article/219364.htm

This is the end of this article about docker container error codes. For more relevant docker error code content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of several storage methods of docker containers
  • Docker container data volume named mount and anonymous mount issues
  • A Brief Analysis of Patroni in Docker Containers

<<:  jQuery solves the problem of not executing the original event after adding elements

>>:  MySql cache query principle and cache monitoring and index monitoring introduction

Recommend

How to Learn Algorithmic Complexity with JavaScript

Table of contents Overview What is Big O notation...

VMware15/16 Detailed steps to unlock VMware and install MacOS

VMware version: VMware-workstation-full-16 VMware...

Detailed explanation of how to implement secondary cache with MySQL and Redis

Redis Introduction Redis is completely open sourc...

Examples of using HTML list tags dl, ul, ol

Copy code The code is as follows: <!-- List ta...

Implementation of nginx worker process loop

After the worker process is started, it will firs...

Detailed tutorial on installing nvidia driver + CUDA + cuDNN in Ubuntu 16.04

Preparation 1. Check whether the GPU supports CUD...

vue-admin-template dynamic routing implementation example

Provide login and obtain user information data in...

Detailed explanation of MySQL index selection and optimization

Table of contents Index Model B+Tree Index select...

MySQL implements an example method of logging in without a password

Specific method: Step 1: Stop the mysql service /...

HTML markup language - table tag

Click here to return to the 123WORDPRESS.COM HTML ...

In-depth understanding of the use of r2dbc in MySQL

Introduction MySQL should be a very common databa...

Prometheus monitors MySQL using grafana display

Table of contents Prometheus monitors MySQL throu...

How to install and deploy MySQL 8.0 under CentOS8

MySQL 8 official version 8.0.11 has been released...

idea uses docker plug-in to achieve one-click automated deployment

Table of contents environment: 1. Docker enables ...