FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=6a862b409947ae919d6b0cdc4250b8734040c5c3 SOURCE_DATE_EPOCH=1571705950 BUILD_VERSION=v4.2.4 SOURCE_GIT_URL=https://github.com/openshift/oauth-server SOURCE_GIT_TAG=v0.0.0-alpha.0-13-g6a862b40 BUILD_RELEASE=201911050122
WORKDIR /go/src/github.com/openshift/oauth-server
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.2.4.20191105.012255
ENV SOURCE_GIT_COMMIT=6a862b409947ae919d6b0cdc4250b8734040c5c3 SOURCE_DATE_EPOCH=1571705950 BUILD_VERSION=v4.2.4 SOURCE_GIT_URL=https://github.com/openshift/oauth-server SOURCE_GIT_TAG=v0.0.0-alpha.0-13-g6a862b40 BUILD_RELEASE=201911050122
COPY --from=builder /go/src/github.com/openshift/oauth-server/oauth-server /usr/bin/
ENTRYPOINT ["/usr/bin/oauth-server"]

LABEL \
        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.k8s.display-name="OpenShift OAuth Server" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-server" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-server/commit/6a862b409947ae919d6b0cdc4250b8734040c5c3" \
        version="v4.2.4" \
        io.openshift.build.commit.id="6a862b409947ae919d6b0cdc4250b8734040c5c3" \
        release="201911050122" \
        io.openshift.tags="openshift, oauth-server"

