ceph-csi/scripts/Dockerfile.devel
Madhu Rajanna 8a3fe53e87 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>
2021-12-15 05:13:36 +00:00

30 lines
723 B
Docker

ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG GOROOT=/usr/local/go
ARG GOARCH
ENV GOPATH=/go \
GOROOT=${GOROOT} \
GO111MODULE=on \
PATH="${GOROOT}/bin:${GOPATH}/bin:${PATH}"
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-${GOARCH}.tar.gz | tar xzf - -C ${GOROOT} --strip-components=1
RUN dnf -y install \
git \
make \
gcc \
librados-devel \
librbd-devel \
&& dnf -y update \
&& true
WORKDIR "/go/src/github.com/ceph/ceph-csi"