FROM openshift/golang-builder:1.10
ENV SOURCE_GIT_COMMIT=a10bf72789cbeac43a4d9d3721ccbba06e70fd5e SOURCE_GIT_TAG=a10bf72 SOURCE_GIT_URL=https://github.com/openshift/telemeter SOURCE_DATE_EPOCH=1571964667 BUILD_VERSION=v4.1.34 BUILD_RELEASE=202002040910
COPY . /go/src/github.com/openshift/telemeter
RUN cd /go/src/github.com/openshift/telemeter && \
    go build ./cmd/telemeter-client && \
    go build ./cmd/telemeter-server && \
    go build ./cmd/authorization-server

FROM openshift/ose-base:v4.1.34-202002031224
ENV SOURCE_GIT_COMMIT=a10bf72789cbeac43a4d9d3721ccbba06e70fd5e SOURCE_GIT_TAG=a10bf72 SOURCE_GIT_URL=https://github.com/openshift/telemeter SOURCE_DATE_EPOCH=1571964667 BUILD_VERSION=v4.1.34 BUILD_RELEASE=202002040910
COPY --from=0 /go/src/github.com/openshift/telemeter/telemeter-client /usr/bin/
COPY --from=0 /go/src/github.com/openshift/telemeter/telemeter-server /usr/bin/
COPY --from=0 /go/src/github.com/openshift/telemeter/authorization-server /usr/bin/

LABEL \
        name="openshift/ose-telemeter" \
        com.redhat.component="telemeter-container" \
        version="v4.1.34" \
        release="202002040910" \
        io.openshift.build.commit.id="a10bf72789cbeac43a4d9d3721ccbba06e70fd5e" \
        io.openshift.build.source-location="https://github.com/openshift/telemeter" \
        io.openshift.build.commit.url="https://github.com/openshift/telemeter/commit/a10bf72789cbeac43a4d9d3721ccbba06e70fd5e"

