From 147b280b5a437d5e1928f7fd6037a9a933aed4ee Mon Sep 17 00:00:00 2001 From: "Otter Prime Sr (steve)" Date: Fri, 23 Jun 2023 09:37:12 -0700 Subject: [PATCH] Use non-root user --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 84d829c..58201b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,10 @@ FROM alpine:3.16 WORKDIR /opt/nginx-k8s-loadbalancer +RUN adduser -u 11115 -D -H nlk + +USER nlk + COPY --from=builder /app/nginx-k8s-loadbalancer . ENTRYPOINT ["/opt/nginx-k8s-loadbalancer/nginx-k8s-loadbalancer"]