flâneur — a map of the web's best reading

6 ways to debug an exploding Docker container | HTTP Toolkit

httptoolkit.com · 664 words · saved by 1 readers

Sometimes things crash when they're running inside a Docker container though, and then all of a sudden it can get much more difficult to work out why, or what the hell to do next. Docker's great, but it's an extra layer of complexity that means you can't always easily poke your app up close any more, and that can really hinder debugging when your container fails to start or breaks in unusual ways. If you're stuck in that situation, here are my goto debugging commands to help you get a bit more information on exactly what's up: docker logs Hopefully you've already tried this, but if not: start here. This'll give you the full STDOUT and STDERR command-line output from the command that was run initially in your container. You can also use docker attach to stream the live logs from an active container, if you want to keep an eye on the output as it runs. docker stats If you just need to keep an eye on the metrics of your container to work out wh

Everything crashes. Sometimes things crash when they're running inside a Docker container though, and then all of a sudden it can get much more difficult to work out why, or what the hell to do next. Docker's great, but it's an extra layer of complexity that means you can't always easily poke your app up close any more, and that can really hinder debugging when your container fails to start or breaks in unusual ways. If you're stuck in that situation, here are my goto debugging commands to help you get a bit more information on exactly what's up: docker logs <container_id> Hopefully you've alr

Explore this link on the map →

related reading