1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/Dockerfile
Markus Lehtonen e866b6ee1c Implement RDT detection in go
Get rid of the dependency on intel-cmt-cat library and rdt helper
binaries written in C. Significantly simplifies the build procedure.

Implements minimal support (in assembler) for getting the raw data from
the CPUID instruction. Also, implement a stub so that the code works on
other architectures than amd64, too.
2019-02-22 22:23:13 +02:00

26 lines
812 B
Docker

# Build node feature discovery
FROM golang:1.8 as builder
ADD . /go/src/sigs.k8s.io/node-feature-discovery
WORKDIR /go/src/sigs.k8s.io/node-feature-discovery
ARG NFD_VERSION
RUN go get github.com/Masterminds/glide
RUN glide install --strip-vendor
RUN go install \
-ldflags "-s -w -X main.version=$NFD_VERSION" \
sigs.k8s.io/node-feature-discovery
RUN install -D -m644 node-feature-discovery.conf.example /etc/kubernetes/node-feature-discovery/node-feature-discovery.conf
RUN go test .
# Create production image for running node feature discovery
FROM debian:stretch-slim
COPY --from=builder /etc/kubernetes/node-feature-discovery /etc/kubernetes/node-feature-discovery
COPY --from=builder /go/bin/node-feature-discovery /usr/bin/node-feature-discovery
ENTRYPOINT ["/usr/bin/node-feature-discovery"]