Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does docker container exit status 255 mean?

Tags:

docker

The doc mentions

You can use a filter to locate containers that exited with status of 137 meaning a SIGKILL(9) killed them

I'm wondering does exit status 255 mean anything special?

like image 499
Gnimuc Avatar asked Jun 05 '18 03:06

Gnimuc


People also ask

What is exit code 255 docker?

When you see exit code 255, it implies the main entrypoint of a container stopped with that status. It means that the container stopped, but it is not known for what reason.

What does exit code 255 mean?

While trying to use SSH, you may get a response indicating permission is denied. Or if you get an error with a code of 255, it means there's a problem with your SSH connection. The command failed with the exit code: 255.

Why did my docker container exit?

This happens if you run a foreground container (using docker run ), and then press Ctrl+C when the program is running. When this happens, the program will stop, and the container will exit. The container has been stopped using docker stop : You can manually stop a container using the docker stop command.


1 Answers

If you see that on a docker ps, showing a container with a status "Exited (255)", that means its main entrpypoint/command process stopped with that status.

And 255 simply means "there was an error", but does not tell you much beside that.


Hence the article "5 ways to debug an exploding Docker container" from Tim Perry, to investigate further:

docker logs <container_id>  docker stats <container_id>  docker cp <container_id>:/path/to/useful/file /local-path  docker exec -it <container_id> /bin/bash  docker commit <container_id> my-broken-container && \ docker run -it my-broken-container /bin/bash 
like image 130
VonC Avatar answered Sep 22 '22 21:09

VonC