Skip to content

Commit

Permalink
Revert "Make envoy user part of the tty group instead of chown stderr… (
Browse files Browse the repository at this point in the history
#34930)

Revert "Make envoy user part of the tty group instead of chown stderr/stdout (#34830)"

This reverts commit 43d6b1e.

Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Jun 26, 2024
1 parent 46f86da commit 3aafd6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions ci/Dockerfile-envoy
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ 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 \
&& useradd --system --no-create-home -d /nonexistent --groups tty --shell /usr/sbin/nologin envoy
&& adduser --group --system 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: 2 additions & 0 deletions ci/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ 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

0 comments on commit 3aafd6d

Please sign in to comment.