build: move GOLANG_VERSION to build.env

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2020-06-22 12:19:37 +02:00
committed by mergify[bot]
parent c9ad904331
commit f83a065c8a
4 changed files with 24 additions and 5 deletions

View File

@ -7,8 +7,11 @@ ENV GOPATH=/go \
GO111MODULE=on \
PATH="${GOROOT}/bin:${GOPATH}/bin:${PATH}"
RUN mkdir -p /usr/local/go && \
curl https://storage.googleapis.com/golang/go1.13.9.linux-amd64.tar.gz | tar xzf - -C ${GOROOT} --strip-components=1
COPY build.env /
RUN source /build.env \
&& 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
RUN dnf -y install \
git \