Skip to content

Commit 87d5576

Browse files
committed
Correct permissions for Hegel binary (a second time)
1 parent 12df913 commit 87d5576

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ ARG TARGETOS
99
RUN apk add --update --upgrade ca-certificates
1010

1111
RUN adduser -D -u 1000 tinkerbell
12-
USER tinkerbell
1312

14-
COPY --chown=tinkerbell ./hegel-$TARGETOS-$TARGETARCH /usr/bin/hegel
13+
COPY ./hegel-$TARGETOS-$TARGETARCH /usr/bin/hegel
14+
15+
# Github's artifact upload action doesn't preserve permissions. While this is a Github specific
16+
# problem, there's no succinct way to fix it in the actions as we build for multiple platforms.
17+
# For now, we'll suffer the extra layer and just chmod the binary.
18+
RUN chmod +x /usr/bin/hegel
19+
20+
# Switching to the tinkerbell user should be done as late as possible so we still use root to
21+
# perform the other commands.
22+
USER tinkerbell
1523
ENTRYPOINT ["/usr/bin/hegel"]

0 commit comments

Comments
 (0)