Drop Root, Keep Working
Run a workload as a non-root user with the right workdir and hostname.
A intermediate Docker challenge worth 10 points. Solve it hands-on in a real Docker environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: Compliance scan: dataproc runs as root. Policy: batch workloads run as uid:gid 1000:1000, work out of /data, standard hostname.
Tasks: recreate dataproc (image alpine, command sleep infinity) with:
- user 1000:1000
- working directory /data
- hostname dataproc01
Commands to learn: docker run --user --workdir --hostname, docker exec id
Run check when done.