-
Notifications
You must be signed in to change notification settings - Fork 179
/
Copy pathDockerfile
36 lines (24 loc) · 883 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM golang:1.20-alpine as builder
COPY . /usr/src/sriov-network-device-plugin
ENV HTTP_PROXY $http_proxy
ENV HTTPS_PROXY $https_proxy
RUN apk add --no-cache --virtual build-dependencies build-base
WORKDIR /usr/src/sriov-network-device-plugin
RUN make clean && \
make build
FROM golang:1.20-alpine3.16 as ddp-builder
ADD images/ddptool-1.0.1.12.tar.gz /tmp/ddptool/
ENV HTTP_PROXY $http_proxy
ENV HTTPS_PROXY $https_proxy
RUN apk add --no-cache --virtual build-dependencies build-base linux-headers
WORKDIR /tmp/ddptool
RUN make
FROM alpine:3
RUN apk add --no-cache hwdata-pci
COPY --from=builder /usr/src/sriov-network-device-plugin/build/sriovdp /usr/bin/
COPY --from=ddp-builder /tmp/ddptool/ddptool /usr/bin/
WORKDIR /
LABEL io.k8s.display-name="SRIOV Network Device Plugin"
COPY ./images/entrypoint.sh /
RUN rm -rf /var/cache/apk/*
ENTRYPOINT ["/entrypoint.sh"]