nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)
This error typically occurs in an Alpine-based Docker image. The official nginx:alpine image already ships with a built-in nginx user — the fix is to reuse that user and assign the correct file ownership before switching to it.
For more context, see the Stack Overflow reference that documents this pattern.
Dockerfile