FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202102031949.p0 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202102031949.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=4c0ed6d OS_GIT_VERSION=4.6.0-202102031949.p0-4c0ed6d SOURCE_DATE_EPOCH=1611756541 SOURCE_GIT_COMMIT=4c0ed6d7eb6f374981998a8e919b44329c66af82 SOURCE_GIT_TAG=atomic-openshift-descheduler-4.0.0-0.100.0-487-g4c0ed6d7e 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/ose-base:rhel8.2.els.rhel
ENV __doozer=update BUILD_RELEASE=202102031949.p0 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202102031949.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=4c0ed6d OS_GIT_VERSION=4.6.0-202102031949.p0-4c0ed6d SOURCE_DATE_EPOCH=1611756541 SOURCE_GIT_COMMIT=4c0ed6d7eb6f374981998a8e919b44329c66af82 SOURCE_GIT_TAG=atomic-openshift-descheduler-4.0.0-0.100.0-487-g4c0ed6d7e 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="202102031949.p0" \
        io.openshift.build.commit.id="4c0ed6d7eb6f374981998a8e919b44329c66af82" \
        io.openshift.build.source-location="https://github.com/openshift/descheduler" \
        io.openshift.build.commit.url="https://github.com/openshift/descheduler/commit/4c0ed6d7eb6f374981998a8e919b44329c66af82" \
        version="v4.6.0"

