diff --git a/CONTROLLER_VERSION b/CONTROLLER_VERSION index 3d976375a..a7298ce13 100644 --- a/CONTROLLER_VERSION +++ b/CONTROLLER_VERSION @@ -1 +1 @@ -1.29.57 +1.29.58 diff --git a/Dockerfile b/Dockerfile index c43d34b0d..312e360bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,27 +8,23 @@ COPY go.sum go.sum COPY cmd cmd COPY pkg pkg COPY hack hack +COPY CONTROLLER_VERSION CONTROLLER_VERSION +RUN cd /workdir && curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl RUN make mcad-controller FROM registry.access.redhat.com/ubi8/ubi-minimal:latest COPY --from=BUILDER /workdir/_output/bin/mcad-controller /usr/local/bin +COPY --from=BUILDER /workdir/kubectl /usr/local/bin RUN true \ && microdnf update \ - && microdnf --nodocs install \ - curl shadow-utils \ && microdnf clean all \ && true -RUN cd /usr/local/bin && curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl - WORKDIR /usr/local/bin -RUN groupadd --system --gid=9999 mcad && \ - useradd --system --create-home --uid=9999 --gid=mcad mcad - -RUN chown -R mcad:mcad /usr/local/bin +RUN chown -R 1000:1000 /usr/local/bin -USER mcad +USER 1000