File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -861,6 +861,12 @@ case $CI_TARGET in
861861 ;;
862862
863863 verify-distroless)
864+ DISTROLESS_TEST_TARGET=" ${DISTROLESS_TEST_TARGET:- distroless-dev} "
865+ distroless_user=" $( docker inspect --format ' {{.Config.User}}' envoyproxy/envoy:" ${DISTROLESS_TEST_TARGET} " ) "
866+ if [[ " $distroless_user " == 0 ]]; then
867+ echo " FAIL: Distroless container uses the root user" >&2
868+ exit 1
869+ fi
864870 docker build -f ci/Dockerfile-distroless-testing --target=envoy-distroless -t distroless-testing .
865871 docker run --rm distroless-testing
866872 docker build -f ci/Dockerfile-distroless-testing --target=envoy-contrib-distroless -t distroless-contrib-testing .
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ COPY --chown=0:0 --chmod=755 \
5959
6060
6161# STAGE: envoy-distroless
62- FROM gcr.io/distroless/base-nossl-debian12:nonroot@sha256:c8430558b9a8688298c060ddc5e6f2993c8a092dee8a6b7058139ac8472e8ad0 AS envoy-distroless
62+ FROM gcr.io/distroless/base-nossl-debian12:nonroot@sha256:177f4df07b055157cc1114033c1e531b251c8f7ef5ef17e1248dc3a52ec4de60 AS envoy-distroless
6363EXPOSE 10000
6464ENTRYPOINT ["/usr/local/bin/envoy"]
6565CMD ["-c", "/etc/envoy/envoy.yaml"]
You can’t perform that action at this time.
0 commit comments