From d5e6fa7d031f5554c98bc6a5186bc4e46504cbc5 Mon Sep 17 00:00:00 2001 From: Eric Herbrandson Date: Thu, 7 May 2020 15:29:14 -0500 Subject: [PATCH] Modifying contain to user USER 1000 instead of USER node to remove error when PSP is enabled --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 75b824a..e927cf6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,9 @@ RUN npm i --production COPY --from=build-deps /usr/src/app/build /usr/src/app/public COPY /server ./ -USER node +# USER 1000 is the "node" user +# This is to avoid the "container has runAsNonRoot and image has non-numeric user (node), cannot verify user is non-root" +# in clusters with PSP enabled +USER 1000 ENTRYPOINT ["/sbin/tini", "--", "node", "."]