FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=2653eabc8010e979fca3cd88235ec68f39835449 SOURCE_GIT_TAG=golang-github-openshift-oauth-proxy-3.11.115-1
WORKDIR  /go/src/github.com/openshift/oauth-proxy
COPY . .
RUN go build .

FROM ubi7:7.6-159
ENV SOURCE_GIT_COMMIT=2653eabc8010e979fca3cd88235ec68f39835449 SOURCE_GIT_TAG=golang-github-openshift-oauth-proxy-3.11.115-1
COPY --from=builder /go/src/github.com/openshift/oauth-proxy/oauth-proxy /usr/bin/oauth-proxy
ENTRYPOINT ["/usr/bin/oauth-proxy"]

LABEL \
        io.k8s.description="OpenShift OAuth Proxy." \
        com.redhat.component="golang-github-openshift-oauth-proxy-container" \
        vendor="Red Hat" \
        name="openshift/ose-oauth-proxy" \
        License="GPLv2+" \
        io.k8s.display-name="OpenShift OAuth Proxy" \
        io.openshift.build.source-location="https://github.com/openshift/oauth-proxy" \
        io.openshift.build.commit.url="https://github.com/openshift/oauth-proxy/commit/2653eabc8010e979fca3cd88235ec68f39835449" \
        version="v4.1.0" \
        io.openshift.build.commit.id="2653eabc8010e979fca3cd88235ec68f39835449" \
        release="201905191700" \
        io.openshift.tags="oauth"

