FROM openshift/golang-builder:1.11 AS builder
ENV SOURCE_GIT_COMMIT=2f97059c67042293672484a5b686daab59235a63 SOURCE_DATE_EPOCH=1568023911 BUILD_VERSION=v4.1.16 SOURCE_GIT_URL=https://github.com/openshift/ose SOURCE_GIT_TAG=v4.1.16-201909090609 BUILD_RELEASE=201909100604
WORKDIR /go/src/github.com/openshift/origin
COPY . .
RUN make build WHAT=cmd/template-service-broker; \
    mkdir -p /tmp/build; \
    cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/template-service-broker /tmp/build/template-service-broker

FROM openshift/ose-base:v4.1.16.20190910.060423
ENV SOURCE_GIT_COMMIT=2f97059c67042293672484a5b686daab59235a63 SOURCE_DATE_EPOCH=1568023911 BUILD_VERSION=v4.1.16 SOURCE_GIT_URL=https://github.com/openshift/ose SOURCE_GIT_TAG=v4.1.16-201909090609 BUILD_RELEASE=201909100604
COPY --from=builder /tmp/build/template-service-broker /usr/bin/
CMD [ "/usr/bin/template-service-broker" ]

LABEL \
        io.k8s.description="Template Service Broker" \
        com.redhat.component="template-service-broker-container" \
        vendor="Red Hat" \
        name="openshift/ose-template-service-broker" \
        License="GPLv2+" \
        io.k8s.display-name="Template Service Broker" \
        io.openshift.build.source-location="https://github.com/openshift/ose" \
        io.openshift.build.commit.url="https://github.com/openshift/ose/commit/2f97059c67042293672484a5b686daab59235a63" \
        version="v4.1.16" \
        io.openshift.build.commit.id="2f97059c67042293672484a5b686daab59235a63" \
        release="201909100604" \
        io.openshift.tags="openshift"

