2016-09-20 17:42:00 +00:00
|
|
|
# Taken from https://github.com/docker-library/golang/blob/master/1.6/Dockerfile
|
|
|
|
# to build our golang image with debian testing (stretch).
|
|
|
|
FROM buildpack-deps:stretch-scm
|
2016-07-12 00:30:49 +00:00
|
|
|
|
2016-09-20 17:42:00 +00:00
|
|
|
# gcc for cgo.
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
libc6-dev \
|
|
|
|
make \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
ENV GOLANG_VERSION 1.7.1
|
|
|
|
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
|
|
|
|
ENV GOLANG_DOWNLOAD_SHA256 43ad621c9b014cde8db17393dc108378d37bc853aa351a6c74bf6432c1bbd182
|
|
|
|
|
|
|
|
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
|
|
|
|
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
|
|
|
|
&& tar -C /usr/local -xzf golang.tar.gz \
|
|
|
|
&& rm golang.tar.gz
|
|
|
|
|
|
|
|
ENV GOPATH /go
|
|
|
|
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
|
|
|
|
|
|
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
|
|
|
|
WORKDIR $GOPATH
|
|
|
|
|
|
|
|
# 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
|
|
|
|
2016-07-14 21:17:27 +00:00
|
|
|
RUN git clone --depth 1 https://github.com/01org/intel-cmt-cat.git
|
2016-07-12 00:30:49 +00:00
|
|
|
RUN cd intel-cmt-cat/lib; make install
|
2016-07-14 14:56:43 +00:00
|
|
|
RUN cd rdt-discovery; make
|
|
|
|
RUN go get github.com/Masterminds/glide
|
|
|
|
RUN glide install
|
2016-07-14 21:17:27 +00:00
|
|
|
RUN go install \
|
2016-07-19 22:35:42 +00:00
|
|
|
-ldflags "-s -w -X main.version=`git describe --tags --dirty --always`" \
|
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"]
|