fix docker build for arm when targetplatform is aarch64

This commit is contained in:
vdovhanych 2022-09-26 12:55:57 +02:00 committed by Martin
parent 070df1efcc
commit a14145b0a0

View File

@ -29,7 +29,7 @@ fi
# install and configure go
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi \
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; elif [ "$TARGETPLATFORM" = "linux/aarch64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi \
&& cd /opt && wget https://dl.google.com/go/$GOLANG_VERSION.linux-$ARCHITECTURE.tar.gz && \
tar xf $GOLANG_VERSION.linux-$ARCHITECTURE.tar.gz
RUN ln -s /opt/go/bin/go /usr/bin/go