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

Summary of web design experience and skills

■ Website theme planning Be careful not to make yo...

mysql method to recursively search for all child nodes of a menu node

background There is a requirement in the project ...

Vue.set() and this.$set() usage and difference

When we use Vue for development, we may encounter...

How to quickly copy large files under Linux

Copy data When copying data remotely, we usually ...

Vue implements form data validation example code

Add rules to the el-form form: Define rules in da...

WeChat Mini Program Lottery Number Generator

This article shares the specific code of the WeCh...

Teach you how to implement Vue3 Reactivity

Table of contents Preface start A little thought ...

A complete list of commonly used HTML tags and their characteristics

First of all, you need to know some characteristi...

A brief discussion on the solution to excessive data in ElementUI el-select

Table of contents 1. Scenario Description 2. Solu...

CSS draw a lollipop example code

Background: Make a little progress every day, acc...

Vue.js implements the code of clicking the icon to zoom in and leaving

The previous article introduced how Vue can reali...

Vue Element UI custom description list component

This article example shares the specific code of ...

Markup language - simplified tags

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