%define COMPONENT danm
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 4.0.0
-%define RPM_MINOR_VERSION 3
+%define RPM_MINOR_VERSION 4
%define DANM_VERSION 5e15d4e322fc5ff89b06ac70bd83b5ce4c09d0df
%define CNI_VERSION 0.8.1
-%define go_version 1.12.1
+%define go_version 1.12.9
%define SRIOV_VERSION 9e4c973b2ac517c64867e33d61aee152d70dc330
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
%define binary_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/binary-save
%define COMPONENT hyperdanm
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 4.0.0
-%define RPM_MINOR_VERSION 1
+%define RPM_MINOR_VERSION 2
%define DANM_VERSION 5e15d4e322fc5ff89b06ac70bd83b5ce4c09d0df
-%define go_version 1.12.1
+%define go_version 1.12.9
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
%define danm_components netwatcher svcwatcher webhook
%define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build
%define COMPONENT sriovdp
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 2.0.0
-%define RPM_MINOR_VERSION 4
+%define RPM_MINOR_VERSION 5
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
+%define go_version 1.12.9
Name: %{RPM_NAME}
Version: %{RPM_MAJOR_VERSION}
--build-arg https_proxy="${https_proxy}" \
--build-arg no_proxy="${no_proxy}" \
--build-arg SRIOVDP="%{RPM_MAJOR_VERSION}" \
+ --build-arg go_version="%{go_version}" \
--tag %{COMPONENT}:%{IMAGE_TAG} \
%{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/
ARG SRIOVDP
ENV SRIOVDP_VERSION=$SRIOVDP
ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
+ARG go_install_dir="/usr/local/go"
+ARG go_version
+ENV PATH $GOPATH/bin:$go_install_dir/bin:/usr/local/go/bin:$PATH
ENV GOOS=linux
WORKDIR /
RUN apk add --no-cache jq \
-&& apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \
+&& apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git bash curl tar \
+&& mkdir -p $go_install_dir \
+&& curl -fsSL -k https://dl.google.com/go/go${go_version}.src.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
+&& cd ${go_install_dir}/src/ \
+&& ./make.bash \
&& mkdir -p $GOPATH/src/github.com/intel \
&& git clone https://github.com/intel/sriov-network-device-plugin.git $GOPATH/src/github.com/intel/sriov-network-device-plugin --branch=v${SRIOVDP_VERSION} \
&& cd $GOPATH/src/github.com/intel/sriov-network-device-plugin \
&& rm -rf $GOPATH/src \
&& rm -rf $GOPATH/bin \
&& apk del .tools \
+&& rm -rf $go_install_dir \
&& rm -rf /var/cache/apk/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* \