Moby: What is Docker container exit code 137?

Created on 10 Mar 2016  ·  12Comments  ·  Source: moby/moby

Is there an official exit code list?

image

kinquestion

Most helpful comment

Commenting because this shows up in google searches.
You'll see this exit code when you do a docker stop and the initial graceful stop fails and docker has to do a sigkill. Per @HackToday's comment/link it is a standard: 128 + 9 = 137 (9 coming from SIGKILL).

All 12 comments

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

For more information about reporting issues, see CONTRIBUTING.md.

You _don't_ have to include this information if this is a _feature request_

(This is an automated, informational response)


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

ENEEDMOREINFO

I think it is linux standard, check here

http://tldp.org/LDP/abs/html/exitcodes.html

if it is your needs?

The exit code is not from Docker, it is from the process in the container.

Commenting because this shows up in google searches.
You'll see this exit code when you do a docker stop and the initial graceful stop fails and docker has to do a sigkill. Per @HackToday's comment/link it is a standard: 128 + 9 = 137 (9 coming from SIGKILL).

To tackle, you might want to try changing memory allocation in Docker > Preference > Memory (for Mac with local docker setup). Should try increasing it.

Also commenting because I ended up here from Google. If you're getting this error from Docker 4 Mac, it's likely because the Linux OOM killer is getting triggered. Allocating more RAM to Docker solves it.

I came across this page when ElasticSearch failed to start. I was trying to keep it's memory low so had configured mem_limit=384m and it was terminating with this error code. Setting the limit to 512m fixed it. So perhaps the issue is memory related.

The exit status is documented in https://docs.docker.com/engine/reference/run/#exit-status (source: https://github.com/docker/cli/blob/master/docs/reference/run.md#exit-status), but may need some additional explanation; if someone is interested in opening a pull request, that would be welcome

Repeating what's said above, this happens on OSX because of Docker 4 Mac's hard memory cap. You can increase your memory limit in Docker App > Preferences > Advanced.

You can also try increasing the disc image size, Docker > Preference > Memory

I think the problem can be solve by this https://bobcares.com/blog/error-137-docker

The solution that worked for me: In “Docker -> Preferences-> Advanced” I have increased the Memory from 2 to 3 and it fixed the Error 137. If it doesn't work, then try increasing Swap also.

Was this page helpful?
0 / 5 - 0 ratings