FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=3ac077fa8097fb851532453fa6e772e1dcfcb3bb SOURCE_GIT_TAG=v0.0.0-alpha.0-15-g3ac077fa SOURCE_GIT_URL=https://github.com/openshift/oauth-server SOURCE_DATE_EPOCH=1573452672 BUILD_VERSION=v4.2.21 BUILD_RELEASE=202002240343
WORKDIR /go/src/github.com/openshift/oauth-server
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.2.21.20200224.034357
ENV SOURCE_GIT_COMMIT=3ac077fa8097fb851532453fa6e772e1dcfcb3bb SOURCE_GIT_TAG=v0.0.0-alpha.0-15-g3ac077fa SOURCE_GIT_URL=https://github.com/openshift/oauth-server SOURCE_DATE_EPOCH=1573452672 BUILD_VERSION=v4.2.21 BUILD_RELEASE=202002240343
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" \
        version="v4.2.21" \
        release="202002240343" \
        io.openshift.build.commit.id="3ac077fa8097fb851532453fa6e772e1dcfcb3bb" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-server" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-server/commit/3ac077fa8097fb851532453fa6e772e1dcfcb3bb"

