FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=64fc3691e84c60d7e395c9f3c7d1653bcbe78604 SOURCE_DATE_EPOCH=1568993931 BUILD_VERSION=v4.2.1 SOURCE_GIT_URL=https://github.com/openshift/cluster-authentication-operator SOURCE_GIT_TAG=64fc3691 BUILD_RELEASE=201910221723
WORKDIR /go/src/github.com/openshift/cluster-authentication-operator
COPY . .
ENV GO_PACKAGE github.com/openshift/cluster-authentication-operator
RUN go build -ldflags "-X $GO_PACKAGE/pkg/version.versionFromGit=$(git describe --long --tags --abbrev=7 --match 'v[0-9]*')" -tags="ocp" -o authentication-operator ./cmd/authentication-operator

FROM openshift/ose-base:v4.2.1.20191022.172340
ENV SOURCE_GIT_COMMIT=64fc3691e84c60d7e395c9f3c7d1653bcbe78604 SOURCE_DATE_EPOCH=1568993931 BUILD_VERSION=v4.2.1 SOURCE_GIT_URL=https://github.com/openshift/cluster-authentication-operator SOURCE_GIT_TAG=64fc3691 BUILD_RELEASE=201910221723
COPY --from=builder /go/src/github.com/openshift/cluster-authentication-operator/authentication-operator /usr/bin/
COPY manifests /manifests
ENTRYPOINT ["/usr/bin/authentication-operator"]

LABEL \
        com.redhat.component="ose-cluster-authentication-operator-container" \
        name="openshift/ose-cluster-authentication-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-authentication-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-authentication-operator/commit/64fc3691e84c60d7e395c9f3c7d1653bcbe78604" \
        version="v4.2.1" \
        io.openshift.build.commit.id="64fc3691e84c60d7e395c9f3c7d1653bcbe78604" \
        release="201910221723"

