I'm reading up on Docker Secrets and keep reading that the folks at Docker deliberately chose storing secrets in files under /run/secrets
rather than going with environment variables. But nowhere have I been able to find an explanation as to why.
So I ask: why is using the Docker Secrets mechanism more secure than injecting environment variables into my containers (via -e
or a --env-file
)?