mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
Fixed vulnerabilities in Docker image.
- Updated to debian testing (stretch). - Updated to go v1.7. - Added .dockerignore file.
This commit is contained in:
parent
5d43beefcc
commit
e373c658f5
2 changed files with 30 additions and 1 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
node-feature-discovery
|
||||
node-feature-discovery-job.json
|
||||
vendor/
|
28
Dockerfile
28
Dockerfile
|
@ -1,5 +1,31 @@
|
|||
FROM golang:1.6
|
||||
# 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
|
||||
|
||||
# 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.
|
||||
ADD . /go/src/github.com/kubernetes-incubator/node-feature-discovery
|
||||
|
||||
WORKDIR /go/src/github.com/kubernetes-incubator/node-feature-discovery
|
||||
|
|
Loading…
Reference in a new issue