From 258c8c0b2c2e47e978b62977a7ba01b8281062ca Mon Sep 17 00:00:00 2001 From: Aleksandr Vinokurov Date: Tue, 16 Nov 2021 17:48:56 +0100 Subject: [PATCH] Set numeric user to comply runAsNonRoot k8s policy When in k8s, container has `runAsNonRoot` policy and image has non-numeric user (nobody), then the deployment will fail as it cannot verify user is non-root. Closes #406 Signed-off-by: Aleksandr Vinokurov --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f4a1910..b6ec721 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG ARCH="amd64" ARG OS="linux" COPY .build/${OS}-${ARCH}/statsd_exporter /bin/statsd_exporter -USER nobody +USER 65534 EXPOSE 9102 9125 9125/udp HEALTHCHECK CMD wget --spider -S "http://localhost:9102/metrics" -T 60 2>&1 || exit 1 ENTRYPOINT [ "/bin/statsd_exporter" ]