2020-06-22 13:54:18 +00:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
FROM ${BASE_IMAGE}
|
2019-12-30 19:47:02 +00:00
|
|
|
|
2020-04-20 15:24:37 +00:00
|
|
|
ARG GOROOT=/usr/local/go
|
|
|
|
|
2020-03-31 05:29:25 +00:00
|
|
|
ENV GOPATH=/go \
|
2020-04-20 15:24:37 +00:00
|
|
|
GOROOT=${GOROOT} \
|
|
|
|
GO111MODULE=on \
|
|
|
|
PATH="${GOROOT}/bin:${GOPATH}/bin:${PATH}"
|
2020-04-07 12:46:49 +00:00
|
|
|
|
2020-06-22 10:19:37 +00:00
|
|
|
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
|
2019-12-30 19:47:02 +00:00
|
|
|
|
2020-04-20 15:22:19 +00:00
|
|
|
RUN dnf -y install \
|
2020-03-31 05:29:25 +00:00
|
|
|
git \
|
2019-12-30 19:47:02 +00:00
|
|
|
make \
|
2020-04-07 12:46:49 +00:00
|
|
|
gcc \
|
2019-12-30 19:47:02 +00:00
|
|
|
librados-devel \
|
|
|
|
librbd-devel \
|
2020-04-20 15:22:19 +00:00
|
|
|
&& dnf -y update \
|
2019-12-30 19:47:02 +00:00
|
|
|
&& true
|
2020-04-20 15:30:11 +00:00
|
|
|
|
|
|
|
WORKDIR "/go/src/github.com/ceph/ceph-csi"
|