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?
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With