From 5e4275f443ad50eaf9de2e648f03175000d8abe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Gonz=C3=A1lez?= Date: Thu, 19 Sep 2024 20:04:39 +0200 Subject: [PATCH] chore: add Containerfile for populator-controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ernesto González --- build/populator-controller/Containerfile | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build/populator-controller/Containerfile diff --git a/build/populator-controller/Containerfile b/build/populator-controller/Containerfile new file mode 100644 index 000000000..39ee77f59 --- /dev/null +++ b/build/populator-controller/Containerfile @@ -0,0 +1,25 @@ +FROM registry.access.redhat.com/ubi9/go-toolset:1.21.11-9 AS builder +WORKDIR /app +COPY --chown=1001:0 ./ ./ +ENV GOFLAGS "-mod=vendor -tags=strictfipsruntime" +ENV GOEXPERIMENT strictfipsruntime + +RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o controller github.com/konveyor/forklift-controller/cmd/populator-controller + +FROM registry.access.redhat.com/ubi9-minimal:9.4-1227.1725849298 +# Required to be able to get files from within the pod +RUN microdnf -y install tar && microdnf clean all + +COPY --from=builder /app/controller /usr/local/bin/populator-controller +ENTRYPOINT ["/usr/local/bin/populator-controller"] + +LABEL \ + com.redhat.component="forklift-populator-controller-container" \ + name="forklift/forklift-populator-controller-rhel9" \ + license="Apache License 2.0" \ + io.k8s.display-name="Forklift" \ + io.k8s.description="Forklift - Populator Controller" \ + io.openshift.tags="migration,mtv,forklift" \ + summary="Forklift - Populator Controller" \ + description="Forklift - Populator Controller" \ + maintainer="Forklift by Konveyor Community "