Quantcast
Channel: Why docker container exits immediately - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by ychz for Why docker container exits immediately

$
0
0

docker logs information is not usually helpful to me. Sometimes app's log is same as docker logs output, sometimes is not.

docker inspect not helpful in most case either, unless it is a very obvious error.

If your Entrypoint or last command failed, just find the log generated by that command. Persist the container log through a volume on your host and check the log.

Alternatively, if you prefer a somehow interactive environment. Let you container enter sleep mode. Entrypoint sleep(whatever long you like), then log into the container with docker exec -it container_id sh and run your Entrypoint command manually, see what is going on.


Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>