Skip to content

Commit

Permalink
Fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kazukazu123123 authored Jun 16, 2024
1 parent ba8781d commit 832075f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/files/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
FROM --platform=$BUILDPLATFORM busybox:1.36.1-uclibc@sha256:97d85ff9630b634ddff3e3ff69fd02bc3b69de8dba0c5002eb0ad6915d1bf4c0 AS env
ARG TARGETPLATFORM
RUN --mount=type=bind,source=artifact,target=artifact \
if [ "$TARGETPLATFORM" = 'darwin/amd64' ]; then\
cp artifact/x86_64-apple-darwin/cpuusage .\
;elif [ "$TARGETPLATFORM" = 'darwin/arm64' ]; then\
cp artifact/aarch64-apple-darwin/cpuusage .\
;elif [ "$TARGETPLATFORM" = 'linux/amd64' ]; then\
if [ "$TARGETPLATFORM" = 'linux/amd64' ]; then\
cp artifact/x86_64-unknown-linux-musl/cpuusage .\
;elif [ "$TARGETPLATFORM" = 'linux/arm64' ]; then\
cp artifact/aarch64-unknown-linux-musl/cpuusage .\
;fi

FROM --platform=$BUILDPLATFORM scratch as runner
COPY --from=env --chmod=755 cpuusage .
ENTRYPOINT ["./cpuusage"]
ENTRYPOINT ["./cpuusage"]

0 comments on commit 832075f

Please sign in to comment.