Skip to content

Commit

Permalink
chore: improved dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Dec 18, 2022
1 parent 21fadc7 commit 47f9b02
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ FROM alpine:3.16 AS base
# hadolint ignore=DL3018
RUN apk add --no-cache --update nodejs

RUN addgroup -S node && adduser -S node -G node

WORKDIR /action

ENTRYPOINT [ "node" ]
Expand Down Expand Up @@ -39,11 +37,9 @@ LABEL com.github.actions.name="Conventional Commit Lint" \

# copy from build image
COPY --from=build /usr/local/lib/node_modules /usr/lib/node
COPY --from=build --chown=node:node /action/node_modules ./node_modules
COPY --from=build /action/node_modules ./node_modules

# copy files
COPY --chown=node:node action ./

USER node
COPY action ./

CMD ["/action/index.js"]

0 comments on commit 47f9b02

Please sign in to comment.