diff --git a/.ci-operator.yaml b/.ci-operator.yaml new file mode 100644 index 000000000..a83f0f843 --- /dev/null +++ b/.ci-operator.yaml @@ -0,0 +1,4 @@ +build_root_image: + name: release + namespace: openshift + tag: rhel-9-release-golang-1.21-openshift-4.16 diff --git a/openshift-hack/images/Dockerfile.openshift b/openshift-hack/images/Dockerfile.openshift new file mode 100644 index 000000000..10bd156b5 --- /dev/null +++ b/openshift-hack/images/Dockerfile.openshift @@ -0,0 +1,11 @@ +# Build IBM cloud controller manager binary +FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS ccm-builder +WORKDIR /build +COPY . . +RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o ibm-cloud-controller-manager . + +# Assemble the final image +FROM registry.ci.openshift.org/ocp/4.16:base-rhel9 +LABEL description="IBM Cloud Controller Manager" +COPY --from=ccm-builder /build/ibm-cloud-controller-manager /bin/ibm-cloud-controller-manager +ENTRYPOINT [ "/bin/ibm-cloud-controller-manager" ]