Survive the Reboot
Give a container a restart policy so daemon restarts don't take it down.
A beginner Docker challenge worth 3 points. Solve it hands-on in a real Docker environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: Last night the Docker daemon restarted and the worker container never came back — nobody noticed until the queue backed up for six hours.
Tasks:
- Recreate
worker(imagealpine, commandsleep infinity) so it restarts automatically after daemon/host reboots - …but stays down when an engineer deliberately stops it (pick the right policy!)
Commands to learn: docker run --restart, docker inspect
Run check when done.