ci: install arch specific go in Dockerfile.devel

Instead of installing the amd64 on all the
platforms, install architecture specific go
version for devel dockerfile

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2021-12-14 09:44:47 +05:30
committed by mergify[bot]
parent b1a3b02741
commit 8a3fe53e87
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@ ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG GOROOT=/usr/local/go
ARG GOARCH
ENV GOPATH=/go \
GOROOT=${GOROOT} \
@ -11,8 +12,10 @@ ENV GOPATH=/go \
COPY build.env /
RUN source /build.env \
&& \
( test -n "${GOARCH}" && exit 0; echo -e "\n\nMissing GOARCH argument for building image, install Golang or run: make containerized-build GOARCH=amd64\n\n"; exit 1 ) \
&& mkdir -p /usr/local/go \
&& curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz | tar xzf - -C ${GOROOT} --strip-components=1
&& curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz | tar xzf - -C ${GOROOT} --strip-components=1
RUN dnf -y install \
git \