Skip to content

Commit

Permalink
Chown user group
Browse files Browse the repository at this point in the history
  • Loading branch information
aviral-nayya authored May 18, 2023
1 parent 7788027 commit ae43816
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine

LABEL "repository"="https://github.com/WiktorJ/github-tag-action"
LABEL "homepage"="https://github.com/WiktorJ/github-tag-action"
LABEL "maintainer"="Wiktor Jurasz"
Expand All @@ -9,8 +10,13 @@ RUN install ./contrib/semver /usr/local/bin
COPY entrypoint.sh /entrypoint.sh

RUN apk add --no-cache git
RUN chown -R $USER /github/workspace
RUN git config --global --add safe.directory /github/workspace
RUN apk update && apk add bash git curl jq
RUN apk update && apk add bash curl jq

# Change the ownership of files in /github/workspace
RUN addgroup -g 1000 mygroup && \
adduser -D -u 1000 -G mygroup myuser && \
chown -R myuser:mygroup /github/workspace

USER myuser

ENTRYPOINT ["/entrypoint.sh"]

0 comments on commit ae43816

Please sign in to comment.