From da10b33e190d8be29169075a5953c443ed87ac3c Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 16 Jan 2025 10:35:27 -0500 Subject: [PATCH] Use UID number rather than username in Dockerfile Systems configured to disallow running images as root aren't able to run images that use user name string values for the `USER` because they can't validate that a named user isn't root. To allow this image to run on such systems, use the uid of the user as the value for `USER` instead of the username. See: https://github.com/kubernetes/kubernetes/pull/56503 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 60a2346..7c2e19b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,7 +18,7 @@ COPY --from=build /pack/markdownlint-cli2-*.tgz / RUN npm install --global --no-package-lock --production /markdownlint-cli2-*.tgz RUN rm /markdownlint-cli2-*.tgz -USER node +USER 1000 WORKDIR /workdir