DockerPlay
1
🚨 challenge-01beginner

The Crash Loop Container (Exit Code 1)

A newly deployed authentication container exits right after startup. Inspect the logs to determine the missing configuration and fix it.

Simulate Broken Production State

The API container `auth-api` stops immediately after running and shows status `Exited (1)`.

Diagnostic Clues & What to Look For:

01.Run `docker ps -a` to see exited containers.
02.Run `docker logs auth-api` to inspect the error stack trace.
03.Notice the error: `FATAL: Missing required environment variable DB_HOST`.
04.Remove the broken container and rerun it with `-e DB_HOST=postgres`.
1-Click Diagnostic Commands:

Root Cause & Solution Summary:

The application crashed because the entrypoint script required the `DB_HOST` environment variable. Passing `-e DB_HOST=postgres` allows the application to connect and stay running.