%define COMPONENT sriovdp
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 2.0.0
-%define RPM_MINOR_VERSION 2
+%define RPM_MINOR_VERSION 3
%define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
Name: %{RPM_NAME}
Vendor: %{_platform_vendor} and intel/sriov-network-device-plugin unmodified
Source0: %{name}-%{version}.tar.gz
-Requires: docker-ce >= 18.09.2
+Requires: docker-ce >= 18.09.2, rsync
BuildRequires: docker-ce >= 18.09.2
%description
--build-arg http_proxy="${http_proxy}" \
--build-arg https_proxy="${https_proxy}" \
--build-arg no_proxy="${no_proxy}" \
- --build-arg SRIOV="%{RPM_MAJOR_VERSION}" \
+ --build-arg SRIOVDP="%{RPM_MAJOR_VERSION}" \
--tag %{COMPONENT}:%{IMAGE_TAG} \
%{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build/%{COMPONENT}/
FROM alpine:3.9
MAINTAINER Levente Kale <levente.kale@nokia.com>
-ARG SRIOV
-ENV SRIOV_VERSION=$SRIOV
+ARG SRIOVDP
+ENV SRIOVDP_VERSION=$SRIOVDP
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
ENV GOOS=linux
WORKDIR /
-RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \
+RUN apk add --no-cache jq \
+&& apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \
&& 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${SRIOV_VERSION} \
+&& 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 \
&& glide --quiet install -v \
&& go install -a -ldflags '-extldflags "-static"' github.com/intel/sriov-network-device-plugin/cmd/sriovdp \
&& rm -rf /tmp/* \
&& rm -rf ~/.glide
-RUN chmod 700 /usr/local/bin/sriovdp
+RUN chmod 700 /usr/local/bin/sriovdp
LABEL io.k8s.display-name="SRIOV Network Device Plugin"
ENTRYPOINT ["/usr/local/bin/sriovdp"]