Interview Prep/Docker/CI/CD and production rollouts

Containerize a legacy app that writes config on startup and expects root.

AdvancedScenarioCI/CD and production rollouts
Answer

Situation read → Not cloud-native.

What I'd do → Wrap with an entrypoint that templates config from env into a writable dir, run as non-root with chown on needed dirs at build time, mount state on a volume, send logs to stdout, and add a health script. If root is unavoidable, drop capabilities, use userns/rootless and read-only mounts.

Why → Incremental hardening beats rewriting.

Interview tip → Document the exceptions and set a remediation plan.

All Docker questions Roadmap: Docker & containers

More on CI/CD and production rollouts