Lesson 4.3

Debugging a failing container

The exit code narrows the problem immediately: a non-zero application code points at your code, while codes from a signal usually mean the container was killed — most often an…

6mBeginner12.8k students

Overview

Start with the exit code

The exit code narrows the problem immediately: a non-zero application code points at your code, while codes from a signal usually mean the container was killed — most often an out-of-memory kill, which produces no application error at all.

Inspecting a container shows the resolved configuration: the actual command, environment, mounts, and network. It is frequently different from what you thought you specified.

When a container exits instantly, override the entrypoint with a shell and run the command by hand. The failure is usually a missing file or a permission the runtime image does not have.

In this lesson you will:

  • Read logs and exit codes
  • Inspect a container that will not start
  • Reproduce a failure interactively

Resources

Previous Lesson
Debugging a failing container — Docker Essentials — Vertex