FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202103060100.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-202103060100.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=d00e67a0b5e0d7c303b201a5bbcb943a9bc26774 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=20+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.20.1+d00e67a OS_GIT_COMMIT=d00e67a OS_GIT_VERSION=4.7.0-202103060100.p0-d00e67a SOURCE_DATE_EPOCH=1612553290 SOURCE_GIT_COMMIT=d00e67a0b5e0d7c303b201a5bbcb943a9bc26774 SOURCE_GIT_TAG=d00e67a SOURCE_GIT_URL=https://github.com/openshift/oauth-apiserver 
WORKDIR /go/src/github.com/openshift/oauth-apiserver
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.7.0.20210306.014800
ENV __doozer=update BUILD_RELEASE=202103060100.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-202103060100.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=d00e67a0b5e0d7c303b201a5bbcb943a9bc26774 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=20+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.20.1+d00e67a OS_GIT_COMMIT=d00e67a OS_GIT_VERSION=4.7.0-202103060100.p0-d00e67a SOURCE_DATE_EPOCH=1612553290 SOURCE_GIT_COMMIT=d00e67a0b5e0d7c303b201a5bbcb943a9bc26774 SOURCE_GIT_TAG=d00e67a SOURCE_GIT_URL=https://github.com/openshift/oauth-apiserver 
COPY --from=builder /go/src/github.com/openshift/oauth-apiserver/oauth-apiserver /usr/bin/
ENTRYPOINT ["/usr/bin/oauth-apiserver"]

LABEL \
        io.k8s.display-name="OpenShift OAuth API Server Command" \
        io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
        io.openshift.tags="openshift,oauth-apiserver" \
        name="openshift/ose-oauth-apiserver" \
        com.redhat.component="ose-oauth-apiserver-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="oauth-apiserver" \
        release="202103060100.p0" \
        io.openshift.build.commit.id="d00e67a0b5e0d7c303b201a5bbcb943a9bc26774" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-apiserver" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-apiserver/commit/d00e67a0b5e0d7c303b201a5bbcb943a9bc26774" \
        version="v4.7.0"

