mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
e866b6ee1c
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.
26 lines
812 B
Docker
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"]
|