From 259181809ffe65691e740b5d881d0252f8763515 Mon Sep 17 00:00:00 2001 From: Conicaw Date: Sun, 30 Jul 2023 16:26:23 -0500 Subject: [PATCH] fix: remove USER instruction in Dockerfile Remove the USER instruction in the Dockerfile to make it run as the default root user, which is required by github. > Docker actions must be run by the default Docker user (root). > Do not use the USER instruction in your Dockerfile, because you > won't be able to access the GITHUB_WORKSPACE directory. > For more information, see "Variables" and USER reference in the Docker documentation. https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user --- Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60dc6522..d8753f61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,9 +30,6 @@ RUN node install.js FROM base AS app -RUN addgroup -g 1000 node \ - && adduser -u 1000 -G node -s /bin/sh -D node - LABEL com.github.actions.name="Conventional Commit Lint" \ com.github.actions.description="commitlint your PRs with Conventional style" \ com.github.actions.icon="search" \ @@ -46,8 +43,6 @@ COPY --from=build /action/node_modules ./node_modules # copy files COPY src ./ -USER node - HEALTHCHECK NONE CMD ["/action/index.js"]