Interview Prep/Docker/CI/CD and production rollouts

Run scheduled jobs in containers.

BeginnerScenarioCI/CD and production rollouts
Answer

Situation read → Periodic tasks like cleanup.

What I'd do → Use the host's cron/systemd timer calling docker run --rm job:1.0, or a scheduler container, or Kubernetes CronJob. Avoid running crond inside app containers.

Why → Jobs get their own limits, logs and exit codes.

Interview tip → Make jobs idempotent.

All Docker questions Roadmap: Docker & containers

More on CI/CD and production rollouts