FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202106111650.p0.git.b1027b6 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202106111650.p0.git.b1027b6 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b1027b6 OS_GIT_VERSION=4.5.0-202106111650.p0.git.b1027b6-b1027b6 SOURCE_DATE_EPOCH=1612403244 SOURCE_GIT_COMMIT=b1027b69fb5ba13e84e2b6328a20e32accf45d49 SOURCE_GIT_TAG=v0.0.0-alpha.0-66-gb1027b69 SOURCE_GIT_URL=https://github.com/openshift/oauth-server 
WORKDIR /go/src/github.com/openshift/oauth-server
COPY . .
ENV GO_PACKAGE github.com/openshift/oauth-server
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.5.0.20210611.170122
ENV __doozer=update BUILD_RELEASE=202106111650.p0.git.b1027b6 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202106111650.p0.git.b1027b6 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b1027b6 OS_GIT_VERSION=4.5.0-202106111650.p0.git.b1027b6-b1027b6 SOURCE_DATE_EPOCH=1612403244 SOURCE_GIT_COMMIT=b1027b69fb5ba13e84e2b6328a20e32accf45d49 SOURCE_GIT_TAG=v0.0.0-alpha.0-66-gb1027b69 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" \
        release="202106111650.p0.git.b1027b6" \
        io.openshift.build.commit.id="b1027b69fb5ba13e84e2b6328a20e32accf45d49" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-server" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-server/commit/b1027b69fb5ba13e84e2b6328a20e32accf45d49" \
        version="v4.5.0"

