Demo: debugging a crashing container
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
diagnose a container that exits at start.
Draft outline details
Step by step
- Start Shop;
docker psshows nothing, anddocker ps -ashowsExited (1). - Read
docker logsand find the connection error. - Use
docker inspectto see the environment variables and spot the missing password. - Start a temporary container with
docker run --rm -it --entrypoint sh shop:1.0to look around. - Planned mistake: rebuild the image to change one env var; fix by passing
-eat run time instead of rebuilding. - Run again, confirm health with
curl, and record the cause in a note.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.