2017-12-20 06:51:56 +00:00
|
|
|
FROM golang:1.8
|
2016-09-20 17:42:00 +00:00
|
|
|
|
|
|
|
# Build node feature discovery and set it as entrypoint.
|
2016-08-31 00:04:43 +00:00
|
|
|
ADD . /go/src/github.com/kubernetes-incubator/node-feature-discovery
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2016-08-31 00:04:43 +00:00
|
|
|
WORKDIR /go/src/github.com/kubernetes-incubator/node-feature-discovery
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2018-03-16 16:56:35 +00:00
|
|
|
ENV PATH="/go/src/github.com/kubernetes-incubator/node-feature-discovery/rdt-discovery:${PATH}"
|
|
|
|
|
2018-03-28 12:37:39 +00:00
|
|
|
ENV CMT_CAT_VERSION="v1.2.0"
|
2018-03-16 16:56:35 +00:00
|
|
|
|
2016-12-09 19:32:39 +00:00
|
|
|
ARG NFD_VERSION
|
2017-12-20 06:51:56 +00:00
|
|
|
|
|
|
|
RUN case $(dpkg --print-architecture) in \
|
|
|
|
arm64) \
|
|
|
|
echo "skip rdt on Arm64 platform" \
|
|
|
|
;; \
|
|
|
|
*) \
|
2018-04-11 10:40:43 +00:00
|
|
|
git clone --depth 1 -b $CMT_CAT_VERSION https://github.com/intel/intel-cmt-cat.git && \
|
2018-03-28 12:37:39 +00:00
|
|
|
make -C intel-cmt-cat/lib install && \
|
|
|
|
make -C rdt-discovery \
|
2017-12-20 06:51:56 +00:00
|
|
|
;; \
|
|
|
|
esac
|
|
|
|
|
2016-07-14 14:56:43 +00:00
|
|
|
RUN go get github.com/Masterminds/glide
|
2017-11-21 11:21:56 +00:00
|
|
|
RUN glide install --strip-vendor
|
2016-07-14 21:17:27 +00:00
|
|
|
RUN go install \
|
2016-12-09 19:32:39 +00:00
|
|
|
-ldflags "-s -w -X main.version=$NFD_VERSION" \
|
2016-08-31 00:04:43 +00:00
|
|
|
github.com/kubernetes-incubator/node-feature-discovery
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2016-08-31 00:04:43 +00:00
|
|
|
ENTRYPOINT ["/go/bin/node-feature-discovery"]
|