Skip to content

Commit

Permalink
conditonally download arm spruce
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacharias committed May 3, 2023
1 parent f8c9f7c commit 0f83609
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ RUN apk add --no-cache --no-progress \
libc-dev \
upx

# If arch is arm64 or aarch64, use arm64 download, else, do the amd64 default
# Download spruce here to eliminate the need for curl in the final image
RUN mkdir -p /go/bin && \
curl -L -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-amd64 && \
uname -m && \
if [ $(uname -m) = "aarch64" ] || [ $(uname -m) = "arm64" ]; then export PROC_ARCH="arm64"; else export PROC_ARCH="amd64"; fi && \
curl -L -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-"${PROC_ARCH}" && \
chmod +x /go/bin/spruce

COPY . .
Expand Down

0 comments on commit 0f83609

Please sign in to comment.