Skip to content

Commit beae6e7

Browse files
authored
Merge PR #43: add container targetarch parsing to go installation
- add container targetarch parsing for go installation
2 parents 9e07fdd + fb4d206 commit beae6e7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Containerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ RUN dnf install -y --setopt=install_weak_deps=False --no-docs \
99
make \
1010
util-linux
1111

12+
ARG TARGETARCH
1213
RUN { \
1314
GO_VERSION=$(curl -s 'https://go.dev/VERSION?m=text' | sed -ne 's/^go//p'); \
14-
curl -# -L https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | \
15+
GO_ARCH=$TARGETARCH; \
16+
if [[ "$TARGETARCH" == "arm" ]]; then GO_ARCH="arm64"; fi; \
17+
curl -# -L https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz | \
1518
tar -C /usr/local -zx; \
1619
}
1720
ENV PATH=/usr/local/go/bin:$PATH

0 commit comments

Comments
 (0)