cloudflare / cloudflare/cloudflared

💡Parameterize UID/GID in Dockerfile to run docker image as another user

Open
#1,507 1 comment 0 reactions 0 assignees View on GitHub
Priority: Normal Type: Feature Request
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**Describe the feature you'd like**
Would it be possible to add ENV variables for UID/GID to be able to change them runtime? In rare circumstances it's preferable to run as root or another user (which was default before). This line: https://github.com/cloudflare/cloudflared/blame/1cedefa1c22a74dd6371d4920398d553d01f1391/Dockerfile#L34

**Additional context**
Here is an example on how Microsoft has done it in their docker images: https://github.com/dotnet/dotnet-docker/blob/main/src/runtime-deps/10.0/alpine3.22/amd64/Dockerfile

Additional context on why, is here:
https://github.com/dotnet/dotnet-docker/issues/4506

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.