From 918fea683ee86c1f0d4434eca8cdc78d9343ee43 Mon Sep 17 00:00:00 2001 From: Mike Mason Date: Thu, 7 Jan 2021 13:04:03 -0600 Subject: [PATCH] switch to not using root user Since it is not recommended to run docker services as root we're switching to a newly created user `tinkerbell`. Signed-off-by: Mike Mason --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 32223d60..b6b1fd85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,7 @@ EXPOSE 50061 ENTRYPOINT ["/usr/bin/hegel"] RUN apk add --update --upgrade ca-certificates +RUN adduser -D -u 1000 tinkerbell +USER tinkerbell + COPY --from=0 /usr/myapp/bin/hegel /usr/bin/hegel