The Classic Incidents

Four Incidents You WILL Meet

1. The crash loop - app starts, exits within a second, restart policy retries forever. Cause #1: missing env var or unreachable dependency. docker logs names it; recreate with the right -e flags.

2. Port already allocated - new release can't start; an old container squats on the host port. docker ps (look at PORTS) finds the squatter; remove it, start the new one.

3. Disk full - builds fail, pulls fail, containers won't start. Old stopped containers, dangling images and unused volumes accumulate fast on busy hosts:

$ docker system df            # who is using the space
$ docker container prune      # stopped containers
$ docker image prune          # dangling images (add -a for ALL unused)
$ docker volume prune         # ⚠ check twice - volumes hold data

4. "Running" but dead - process exists, app deadlocked; the LB keeps routing to it. The fix is a healthcheck, so 'running' actually means 'answering':

$ docker run -d --name api -p 8085:80 \
    --health-cmd "wget -qO- http://localhost/ || exit 1" \
    --health-interval 5s --health-retries 3 \
    nginx:alpine
$ docker ps        # …  Up 30 seconds (healthy)
Scenario: All four of these have dedicated labs in the Docker track (Diagnose the Crash Loop, Free the Port, Reclaim the Disk, Prove You're Alive) - each starts in the broken state, and the browser panel shows the user-visible impact before and after your fix.