FROM openshift/golang-builder:1.12 AS builder
ENV __doozer=update BUILD_RELEASE=202005201238 BUILD_VERSION=v4.3.22 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=22 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.22-202005201238 
ENV __doozer=merge OS_GIT_COMMIT=d3065e5 OS_GIT_VERSION=4.3.22-202005201238-d3065e5 SOURCE_DATE_EPOCH=1576141709 SOURCE_GIT_COMMIT=d3065e59ce948f10364d0dd88cb70b860ec65ee2 SOURCE_GIT_TAG=d3065e59 SOURCE_GIT_URL=https://github.com/openshift/oauth-server 
WORKDIR /go/src/github.com/openshift/oauth-server
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.3.22.20200520.123801
ENV __doozer=update BUILD_RELEASE=202005201238 BUILD_VERSION=v4.3.22 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=22 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.22-202005201238 
ENV __doozer=merge OS_GIT_COMMIT=d3065e5 OS_GIT_VERSION=4.3.22-202005201238-d3065e5 SOURCE_DATE_EPOCH=1576141709 SOURCE_GIT_COMMIT=d3065e59ce948f10364d0dd88cb70b860ec65ee2 SOURCE_GIT_TAG=d3065e59 SOURCE_GIT_URL=https://github.com/openshift/oauth-server 
COPY --from=builder /go/src/github.com/openshift/oauth-server/oauth-server /usr/bin/
ENTRYPOINT ["/usr/bin/oauth-server"]

LABEL \
        io.k8s.display-name="OpenShift OAuth Server" \
        io.k8s.description="This is a component of OpenShift and enables cluster authentication" \
        com.redhat.component="oauth-server-container" \
        name="openshift/ose-oauth-server" \
        io.openshift.tags="openshift, oauth-server" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="apiserver-auth" \
        version="v4.3.22" \
        release="202005201238" \
        io.openshift.build.commit.id="d3065e59ce948f10364d0dd88cb70b860ec65ee2" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-server" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-server/commit/d3065e59ce948f10364d0dd88cb70b860ec65ee2"

