FROM openshift/golang-builder:rhel_8_golang_1.16 AS builder
ENV __doozer=update BUILD_RELEASE=202107291502.p0.git.09435a5.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202107291502.p0.git.09435a5.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=09435a5dd505b3b90eb7ce355ab41c8e4c1a349c KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=21+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.21.0+09435a5 OS_GIT_COMMIT=09435a5 OS_GIT_VERSION=4.8.0-202107291502.p0.git.09435a5.assembly.stream-09435a5 SOURCE_DATE_EPOCH=1620443905 SOURCE_GIT_COMMIT=09435a5dd505b3b90eb7ce355ab41c8e4c1a349c SOURCE_GIT_TAG=09435a5d 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.8.0-202107231447.p0.git.ad38e11.assembly.stream
ENV __doozer=update BUILD_RELEASE=202107291502.p0.git.09435a5.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202107291502.p0.git.09435a5.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=09435a5dd505b3b90eb7ce355ab41c8e4c1a349c KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=21+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.21.0+09435a5 OS_GIT_COMMIT=09435a5 OS_GIT_VERSION=4.8.0-202107291502.p0.git.09435a5.assembly.stream-09435a5 SOURCE_DATE_EPOCH=1620443905 SOURCE_GIT_COMMIT=09435a5dd505b3b90eb7ce355ab41c8e4c1a349c SOURCE_GIT_TAG=09435a5d 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="202107291502.p0.git.09435a5.assembly.stream" \
        io.openshift.build.commit.id="09435a5dd505b3b90eb7ce355ab41c8e4c1a349c" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-apiserver" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-apiserver/commit/09435a5dd505b3b90eb7ce355ab41c8e4c1a349c" \
        version="v4.8.0"

