Interview Prep/Docker/Security and scanning

Secrets showing up in `docker inspect` output of production containers.

BeginnerScenarioSecurity and scanning
Answer

Situation read → Passed as -e DB_PASSWORD=...; anyone with Docker access can read them, and they land in shell history and CI logs.

What I'd do → Use secrets files (/run/secrets), --env-file with strict permissions at minimum, or fetch at start from Vault/AWS SM. Restrict Docker API access and rotate leaked values.

Why → docker inspect reveals .Config.Env in plain text.

Interview tip → Orchestrator-native secrets beat env vars.

All Docker questions Roadmap: Docker & containers

More on Security and scanning