You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Twistlock Scan Finding "Image should be created with a non-root user" #5586
For reference, this is still the case after the switch to a distroless base in #7637 (in the 1.22.0 release candidates): the image deliberately keeps running as root because Cortex's default -server.http-listen-port is 80, a privileged port, as explained in the #7637 description. The base image is now an overridable BASEIMG build arg (
), so a non-root image can be built on gcr.io/distroless/static-debian12:nonroot if it's paired with a non-privileged listen port and data directories writable by that user, but publishing non-root images would mean changing that default or shipping a separate variant.
Activity
sandy2008 commentedon Oct 28, 2026
For reference, this is still the case after the switch to a distroless base in #7637 (in the 1.22.0 release candidates): the image deliberately keeps running as root because Cortex's default
-server.http-listen-portis 80, a privileged port, as explained in the #7637 description. The base image is now an overridableBASEIMGbuild arg (cortex/cmd/cortex/Dockerfile
Lines 1 to 8 in 5d93557
gcr.io/distroless/static-debian12:nonrootif it's paired with a non-privileged listen port and data directories writable by that user, but publishing non-root images would mean changing that default or shipping a separate variant.