Skip to content

Commit

Permalink
Correct permissions for Hegel binary (a second time)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdoherty4 committed Nov 15, 2022
1 parent 12df913 commit 87d5576
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ ARG TARGETOS
RUN apk add --update --upgrade ca-certificates

RUN adduser -D -u 1000 tinkerbell
USER tinkerbell

COPY --chown=tinkerbell ./hegel-$TARGETOS-$TARGETARCH /usr/bin/hegel
COPY ./hegel-$TARGETOS-$TARGETARCH /usr/bin/hegel

# Github's artifact upload action doesn't preserve permissions. While this is a Github specific
# problem, there's no succinct way to fix it in the actions as we build for multiple platforms.
# For now, we'll suffer the extra layer and just chmod the binary.
RUN chmod +x /usr/bin/hegel

# Switching to the tinkerbell user should be done as late as possible so we still use root to
# perform the other commands.
USER tinkerbell
ENTRYPOINT ["/usr/bin/hegel"]

0 comments on commit 87d5576

Please sign in to comment.