Interview Prep/Docker/Operations, Rootless & Podman

How do you run a one-off admin task in production safely?

IntermediateProductionOperations, Rootless & Podman
Answer

Prefer a fresh container from the exact deployed image (docker run --rm --network appnet --env-file prod.env app@sha256:... python manage.py task) instead of exec into a live replica: it does not consume the serving container's resources, is auditable, and cannot be left running. Log who ran what, and set a timeout.

All Docker questions Roadmap: Docker & containers

More on Operations, Rootless & Podman