envoyproxy / envoyproxy/envoy

Envoy shouldn't run as root.

Open
#17,610 2 comments 0 reactions 1 assignee Claimed by @phlax View on GitHub
area/docker help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

*Description*:
Some organizations have podsecuritypolicies that prevent containers from running as root.

https://github.com/envoyproxy/envoy/blob/main/ci/docker-entrypoint.sh#L27
https://github.com/envoyproxy/envoy/blob/main/ci/Dockerfile-envoy#L26

After reading the dockerfile and entrypoint script it seems that the container starts off as root but later su-execs to be the envoy user. This isn't good enough for Kubernetes which still sees a container being started as root.

Is there ever a reason to allow Envoy to run as root rather than just doing the logic of the entrypoint script right in the dockerfile with a USER envoy directive?

[optional *Relevant Links*:]
In the knative kourier project envoy is leveraged but envoy is ran as root
https://github.com/knative-sandbox/net-kourier/pull/593
https://github.com/knative/operator/issues/710

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.