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.
More on Operations, Rootless & Podman
How do you set up rootless Docker on Ubuntu?IntermediateHow do rootless containers handle privileged ports and networking?AdvancedWhat is Podman Quadlet?AdvancedCan Podman run Docker Compose files?IntermediateWhat is a Podman pod?IntermediateHow do you remove all Docker containers, images and volumes safely in a dev environment?Beginner