Interview Prep/Docker/Storage, volumes and disk space

Files created in a bind mount are owned by root on the host.

IntermediateTroubleshootingStorage, volumes and disk space
Answer

Likely causes → Container process runs as root.

Diagnose → ls -ln; docker exec c id.

Fix → docker run --user $(id -u):$(id -g); set user: in Compose; use rootless Docker (maps root to your UID).

Prevent → Run non-root.

All Docker questions Roadmap: Docker & containers

More on Storage, volumes and disk space