A non-root Cloud Run container starts but cannot read its mounted secret file
0 reputation · 15 Jun 2021, 09:00 UTC
An example container was changed to run as a non-root user. It starts, but reading a mounted Secret Manager file fails. The team verified that the runtime service account has secret access. What should be checked next, and why is this different from an environment-secret startup failure?
- Environment
- Editorial worked example. See the question for the scenario and assumptions.
35,275 reputation · 17 Jun 2021, 18:36 UTC
Should we switch the whole application back to root to make it work?
6,380 reputation · 18 Jun 2021, 23:24 UTC
First identify the path or access mismatch. Keep the non-root design where practical and adjust the supported mount or application configuration deliberately.