FROM openshift/golang-builder:1.12 AS builder
ENV __doozer=update BUILD_RELEASE=202010141211.p0 BUILD_VERSION=v4.3.40 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=40 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.40-202010141211.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=e61459a OS_GIT_VERSION=4.3.40-202010141211.p0-e61459a SOURCE_DATE_EPOCH=1590084938 SOURCE_GIT_COMMIT=e61459a3903327dddb515a54cd005d4494dfdd38 SOURCE_GIT_TAG=v0.0.0-alpha.0-32-ge61459a3 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.40.20201014.125201
ENV __doozer=update BUILD_RELEASE=202010141211.p0 BUILD_VERSION=v4.3.40 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=40 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.40-202010141211.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=e61459a OS_GIT_VERSION=4.3.40-202010141211.p0-e61459a SOURCE_DATE_EPOCH=1590084938 SOURCE_GIT_COMMIT=e61459a3903327dddb515a54cd005d4494dfdd38 SOURCE_GIT_TAG=v0.0.0-alpha.0-32-ge61459a3 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="202010141211.p0" \
        io.openshift.build.commit.id="e61459a3903327dddb515a54cd005d4494dfdd38" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-server" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-server/commit/e61459a3903327dddb515a54cd005d4494dfdd38" \
        version="v4.3.40"

