forked from kubernetes-sigs/node-feature-discovery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_generator
27 lines (21 loc) · 1.15 KB
/
Dockerfile_generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ARG BUILDER_IMAGE
FROM ${BUILDER_IMAGE} as builder
# Install tools
RUN go install github.com/vektra/mockery/[email protected] && \
go install sigs.k8s.io/controller-tools/cmd/[email protected] && \
git clone https://github.com/kubernetes/code-generator -b v0.29.0 --depth 1 && \
go install k8s.io/code-generator/cmd/go-to-protobuf/[email protected] && \
go install golang.org/x/tools/cmd/[email protected] && \
go install github.com/golang/protobuf/[email protected]
RUN apt-get update && apt-get install unzip
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip && \
unzip protoc-25.3-linux-x86_64.zip -d /usr/local && \
rm protoc-25.3-linux-x86_64.zip && \
chmod a+x /usr/local/bin/protoc && \
find /usr/local -type d | xargs chmod 755 && \
find /usr/local -type f | xargs chmod a+r
# Expect to be working with nfd
WORKDIR /go/node-feature-discovery
# We need to set the /go/node-feature-discovery directory as a safe directory.
# This allows git commands to run in the container on MacOS systems.
RUN git config --file=/.gitconfig --add safe.directory /go/node-feature-discovery