Skip to content
Ameen Abozaid
Planned lessonJNR-049-L08

Demo: debugging a crashing container

  • Lesson 8 of 8
  • Junior
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

  1. Start Shop; docker ps shows nothing, and docker ps -a shows Exited (1).
  2. Read docker logs and find the connection error.
  3. Use docker inspect to see the environment variables and spot the missing password.
  4. Start a temporary container with docker run --rm -it --entrypoint sh shop:1.0 to look around.
  5. Planned mistake: rebuild the image to change one env var; fix by passing -e at run time instead of rebuilding.
  6. 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.