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 Real Production Incident

Injects faulty configuration into the virtual Docker daemon.

Diagnostic Clues & Symptoms

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

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`.

Recommended Investigation & Recovery 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.