Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make envoy user part of the tty group instead of chown stderr/stdout … #34927

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ci/Dockerfile-envoy
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ FROM ${BUILD_OS}:${BUILD_TAG} AS envoy-base
ENV DEBIAN_FRONTEND=noninteractive
EXPOSE 10000
CMD ["envoy", "-c", "/etc/envoy/envoy.yaml"]
# Ensure the envoy user is able to write to container logs owned by root:tty
RUN mkdir -p /etc/envoy \
&& adduser --group --system envoy
&& useradd --system --no-create-home -d /nonexistent --groups tty --shell /usr/sbin/nologin envoy
ENTRYPOINT ["/docker-entrypoint.sh"]
# NB: Adding this here means that following steps, for example updating the system packages, are run
# when the version file changes. This should mean that a release version will always update.
Expand Down
2 changes: 0 additions & 2 deletions ci/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ if [ "$ENVOY_UID" != "0" ] && [ "$USERID" = 0 ]; then
if [ -n "$ENVOY_GID" ]; then
groupmod -g "$ENVOY_GID" envoy
fi
# Ensure the envoy user is able to write to container logs
chown envoy:envoy /dev/stdout /dev/stderr
exec su-exec envoy "${@}"
else
exec "${@}"
Expand Down
Loading