Interview Prep/Docker/Rapid-Fire Commands

Run a throwaway container that mounts the current directory read-only and runs a command as your user.

IntermediateProductionRapid-Fire Commands
Answer
docker run --rm -v "$PWD":/work:ro -w /work -u "$(id -u):$(id -g)" python:3.12-slim python -m compileall .
All Docker questions Roadmap: Docker & containers

More on Rapid-Fire Commands