2024-08-28 13:00:06 +00:00
|
|
|
FROM golang:1.23
|
2021-07-23 09:00:07 +00:00
|
|
|
|
|
|
|
ARG USER=$USER
|
|
|
|
ARG UID=$UID
|
|
|
|
ARG GID=$GID
|
2022-04-15 13:12:08 +00:00
|
|
|
RUN useradd -l -m ${USER} --uid=${UID} && echo "${USER}:" chpasswd
|
2021-07-23 09:00:07 +00:00
|
|
|
USER ${UID}:${GID}
|
|
|
|
|
|
|
|
ARG KUBE_VERSION
|
|
|
|
|
2022-08-18 09:24:08 +00:00
|
|
|
RUN go install k8s.io/code-generator/cmd/defaulter-gen@$KUBE_VERSION
|
|
|
|
RUN go install k8s.io/code-generator/cmd/client-gen@$KUBE_VERSION
|
|
|
|
RUN go install k8s.io/code-generator/cmd/lister-gen@$KUBE_VERSION
|
|
|
|
RUN go install k8s.io/code-generator/cmd/informer-gen@$KUBE_VERSION
|
|
|
|
RUN go install k8s.io/code-generator/cmd/deepcopy-gen@$KUBE_VERSION
|
2024-08-28 13:00:06 +00:00
|
|
|
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.1
|
2021-07-23 09:00:07 +00:00
|
|
|
|
2022-08-18 09:24:08 +00:00
|
|
|
RUN mkdir -p $GOPATH/src/k8s.io/code-generator
|
|
|
|
RUN cp -R $GOPATH/pkg/mod/k8s.io/code-generator@$KUBE_VERSION/* $GOPATH/src/k8s.io/code-generator/
|
2023-11-22 10:28:06 +00:00
|
|
|
RUN chmod +x $GOPATH/src/k8s.io/code-generator/kube_codegen.sh
|
2021-07-23 09:00:07 +00:00
|
|
|
|
|
|
|
WORKDIR $GOPATH/src/k8s.io/code-generator
|