Skip to content

Commit

Permalink
fix: remove USER instruction in Dockerfile
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ttshivers authored and ahmadnassri committed Jul 31, 2023
1 parent b4455af commit 2591818
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -46,8 +43,6 @@ COPY --from=build /action/node_modules ./node_modules
# copy files
COPY src ./

USER node

HEALTHCHECK NONE

CMD ["/action/index.js"]

0 comments on commit 2591818

Please sign in to comment.