2018-05-28 10:47:56 +00:00
|
|
|
# Build node feature discovery
|
2018-11-07 10:39:09 +00:00
|
|
|
FROM golang:1.10 as builder
|
2016-09-20 17:42:00 +00:00
|
|
|
|
2018-11-28 12:30:03 +00:00
|
|
|
ADD . /go/src/sigs.k8s.io/node-feature-discovery
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2018-11-28 12:30:03 +00:00
|
|
|
WORKDIR /go/src/sigs.k8s.io/node-feature-discovery
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2016-12-09 19:32:39 +00:00
|
|
|
ARG NFD_VERSION
|
2017-12-20 06:51:56 +00:00
|
|
|
|
2018-11-07 10:39:09 +00:00
|
|
|
RUN go get github.com/golang/dep/cmd/dep
|
|
|
|
RUN dep ensure
|
2016-07-14 21:17:27 +00:00
|
|
|
RUN go install \
|
2019-01-10 16:02:53 +00:00
|
|
|
-ldflags "-s -w -X sigs.k8s.io/node-feature-discovery/pkg/version.version=$NFD_VERSION" \
|
2019-01-11 13:55:28 +00:00
|
|
|
./cmd/*
|
|
|
|
RUN install -D -m644 nfd-worker.conf.example /etc/kubernetes/node-feature-discovery/nfd-worker.conf
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2019-01-23 08:15:47 +00:00
|
|
|
RUN make test
|
2018-05-28 10:47:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Create production image for running node feature discovery
|
2018-05-28 12:41:32 +00:00
|
|
|
FROM debian:stretch-slim
|
2018-05-28 10:47:56 +00:00
|
|
|
|
2018-07-06 11:11:07 +00:00
|
|
|
COPY --from=builder /etc/kubernetes/node-feature-discovery /etc/kubernetes/node-feature-discovery
|
2019-01-11 13:55:28 +00:00
|
|
|
COPY --from=builder /go/bin/nfd-* /usr/bin/
|