FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202106090743.p0.git.471cf3a BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202106090743.p0.git.471cf3a SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=471cf3a OS_GIT_VERSION=4.7.0-202106090743.p0.git.471cf3a-471cf3a SOURCE_DATE_EPOCH=1611307884 SOURCE_GIT_COMMIT=471cf3ab636c26ed7c9fba6330374a5ea1b36b43 SOURCE_GIT_TAG=471cf3ab SOURCE_GIT_URL=https://github.com/openshift/cluster-api-provider-openstack 
WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-openstack
COPY . .

RUN go build -o ./machine-controller-manager ./cmd/manager

FROM openshift/ose-base:v4.7.0.20210609.080519
ENV __doozer=update BUILD_RELEASE=202106090743.p0.git.471cf3a BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202106090743.p0.git.471cf3a SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=471cf3a OS_GIT_VERSION=4.7.0-202106090743.p0.git.471cf3a-471cf3a SOURCE_DATE_EPOCH=1611307884 SOURCE_GIT_COMMIT=471cf3ab636c26ed7c9fba6330374a5ea1b36b43 SOURCE_GIT_TAG=471cf3ab SOURCE_GIT_URL=https://github.com/openshift/cluster-api-provider-openstack 
RUN INSTALL_PKGS=" \
      openssh \
      " && \
    yum install -y $INSTALL_PKGS && \
    rpm -V $INSTALL_PKGS && \
    yum clean all

COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-openstack/machine-controller-manager /

LABEL \
        name="openshift/ose-openstack-machine-controllers" \
        com.redhat.component="ose-openstack-machine-controllers-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Cloud Compute" \
        io.openshift.maintainer.subcomponent="OpenStack Provider" \
        release="202106090743.p0.git.471cf3a" \
        io.openshift.build.commit.id="471cf3ab636c26ed7c9fba6330374a5ea1b36b43" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-api-provider-openstack" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-api-provider-openstack/commit/471cf3ab636c26ed7c9fba6330374a5ea1b36b43" \
        version="v4.7.0"

