FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202105210300.p0 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-202105210300.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=7295089 OS_GIT_VERSION=4.7.0-202105210300.p0-7295089 SOURCE_DATE_EPOCH=1621003053 SOURCE_GIT_COMMIT=7295089d159568e39bfb20ddc42c1891bbf94446 SOURCE_GIT_TAG=atomic-openshift-descheduler-4.0.0-0.100.0-613-g7295089d1 SOURCE_GIT_URL=https://github.com/openshift/descheduler 
WORKDIR /go/src/sigs.k8s.io/descheduler
COPY . .
RUN go build -o descheduler ./cmd/descheduler

FROM openshift/base-rhel8:v4.7.0.20210521.031450
ENV __doozer=update BUILD_RELEASE=202105210300.p0 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-202105210300.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=7295089 OS_GIT_VERSION=4.7.0-202105210300.p0-7295089 SOURCE_DATE_EPOCH=1621003053 SOURCE_GIT_COMMIT=7295089d159568e39bfb20ddc42c1891bbf94446 SOURCE_GIT_TAG=atomic-openshift-descheduler-4.0.0-0.100.0-613-g7295089d1 SOURCE_GIT_URL=https://github.com/openshift/descheduler 
COPY --from=builder /go/src/sigs.k8s.io/descheduler/descheduler /usr/bin/
CMD ["/usr/bin/descheduler"]

LABEL \
        License="GPLv2+" \
        io.k8s.description="Descheduler for Opensift and Kubernetes" \
        io.k8s.display-name="Descheduler" \
        io.openshift.tags="openshift,descheduler" \
        vendor="Red Hat" \
        name="openshift/ose-descheduler" \
        com.redhat.component="atomic-openshift-descheduler-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="kube-scheduler" \
        release="202105210300.p0" \
        io.openshift.build.commit.id="7295089d159568e39bfb20ddc42c1891bbf94446" \
        io.openshift.build.source-location="https://github.com/openshift/descheduler" \
        io.openshift.build.commit.url="https://github.com/openshift/descheduler/commit/7295089d159568e39bfb20ddc42c1891bbf94446" \
        version="v4.7.0"

