Skip to content
This repository was archived by the owner on Apr 1, 2021. It is now read-only.

Commit 1a8ce21

Browse files
committed
Compile to native arch
This is needed for ARM, where GOARCH is arm64 but the uname reports aarch64.
1 parent 09226a2 commit 1a8ce21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ADD . /build/
55

66

77
RUN mkdir /tmp/cache
8-
RUN export GARCH="$(uname -m)" && if [[ ${GARCH} == "x86_64" ]]; then export GARCH="amd64"; fi && GOOS=linux GOARCH=${GARCH} CGO_ENABLED=0 GOCACHE=/tmp/cache go build -mod=vendor -v -o /tmp/api-server .
8+
RUN CGO_ENABLED=0 GOCACHE=/tmp/cache go build -mod=vendor -v -o /tmp/api-server .
99

1010
FROM scratch
1111

0 commit comments

Comments
 (0)