3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 MAINTAINER Levente Kale <levente.kale@nokia.com>
19 ENV SRIOV_VERSION=$SRIOV
21 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
26 RUN apk add --no-cache --virtual .tools ca-certificates gcc musl-dev go glide git \
27 && mkdir -p $GOPATH/src/github.com/intel \
28 && git clone https://github.com/intel/sriov-network-device-plugin.git $GOPATH/src/github.com/intel/sriov-network-device-plugin --branch=v${SRIOV_VERSION} \
29 && cd $GOPATH/src/github.com/intel/sriov-network-device-plugin \
30 && glide --quiet install -v \
31 && go install -a -ldflags '-extldflags "-static"' github.com/intel/sriov-network-device-plugin/cmd/sriovdp \
32 && cp $GOPATH/bin/sriovdp /usr/local/bin/sriovdp \
33 && rm -rf $GOPATH/src \
34 && rm -rf $GOPATH/bin \
36 && rm -rf /var/cache/apk/* \
37 && rm -rf /var/lib/apt/lists/* \
41 RUN chmod 700 /usr/local/bin/sriovdp
43 LABEL io.k8s.display-name="SRIOV Network Device Plugin"
44 ENTRYPOINT ["/usr/local/bin/sriovdp"]