2018-05-28 13:47:56 +03:00
|
|
|
# Build node feature discovery
|
|
|
|
FROM golang:1.8 as builder
|
2016-09-20 10:42:00 -07:00
|
|
|
|
2018-11-28 14:30:03 +02:00
|
|
|
ADD . /go/src/sigs.k8s.io/node-feature-discovery
|
2016-07-12 02:30:49 +02:00
|
|
|
|
2018-11-28 14:30:03 +02:00
|
|
|
WORKDIR /go/src/sigs.k8s.io/node-feature-discovery
|
2016-07-12 02:30:49 +02:00
|
|
|
|
2016-12-09 11:32:39 -08:00
|
|
|
ARG NFD_VERSION
|
2017-12-20 01:51:56 -05:00
|
|
|
|
2016-07-14 16:56:43 +02:00
|
|
|
RUN go get github.com/Masterminds/glide
|
2017-11-21 12:21:56 +01:00
|
|
|
RUN glide install --strip-vendor
|
2016-07-14 14:17:27 -07:00
|
|
|
RUN go install \
|
2016-12-09 11:32:39 -08:00
|
|
|
-ldflags "-s -w -X main.version=$NFD_VERSION" \
|
2018-11-28 14:30:03 +02:00
|
|
|
sigs.k8s.io/node-feature-discovery
|
2018-07-06 14:11:07 +03:00
|
|
|
RUN install -D -m644 node-feature-discovery.conf.example /etc/kubernetes/node-feature-discovery/node-feature-discovery.conf
|
2016-07-12 02:30:49 +02:00
|
|
|
|
2018-05-28 13:47:56 +03:00
|
|
|
RUN go test .
|
|
|
|
|
|
|
|
|
|
|
|
# Create production image for running node feature discovery
|
2018-05-28 15:41:32 +03:00
|
|
|
FROM debian:stretch-slim
|
2018-05-28 13:47:56 +03:00
|
|
|
|
2018-07-06 14:11:07 +03:00
|
|
|
COPY --from=builder /etc/kubernetes/node-feature-discovery /etc/kubernetes/node-feature-discovery
|
2018-05-28 13:47:56 +03:00
|
|
|
COPY --from=builder /go/bin/node-feature-discovery /usr/bin/node-feature-discovery
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/node-feature-discovery"]
|