File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,10 +10,14 @@ RUN apt-get update \
1010 && apt-get install -y --no-install-recommends ca-certificates curl tar \
1111 && rm -rf /var/lib/apt/lists/*
1212
13- RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tgz \
14- && rm -rf /usr/local/go \
15- && tar -C /usr/local -xzf /tmp/go.tgz \
16- && rm -f /tmp/go.tgz
13+ RUN ARCH=$(dpkg --print-architecture) && \
14+ if [ "$ARCH" = "amd64" ]; then GOARCH=amd64; \
15+ elif [ "$ARCH" = "arm64" ]; then GOARCH=arm64; \
16+ else echo "Unsupported arch: $ARCH" && exit 1; fi && \
17+ curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${GOARCH}.tar.gz" -o /tmp/go.tgz && \
18+ rm -rf /usr/local/go && \
19+ tar -C /usr/local -xzf /tmp/go.tgz && \
20+ rm -f /tmp/go.tgz
1721
1822ENV PATH="/usr/local/go/bin:${PATH}"
1923WORKDIR /src
You can’t perform that action at this time.
0 commit comments