FROM openshift/golang-builder:1.10
ENV SOURCE_GIT_COMMIT=a10bf72789cbeac43a4d9d3721ccbba06e70fd5e SOURCE_DATE_EPOCH=1571964667 BUILD_VERSION=v4.1.30 SOURCE_GIT_URL=https://github.com/openshift/telemeter SOURCE_GIT_TAG=a10bf72 BUILD_RELEASE=202001061940
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.30.20200106.194041
ENV SOURCE_GIT_COMMIT=a10bf72789cbeac43a4d9d3721ccbba06e70fd5e SOURCE_DATE_EPOCH=1571964667 BUILD_VERSION=v4.1.30 SOURCE_GIT_URL=https://github.com/openshift/telemeter SOURCE_GIT_TAG=a10bf72 BUILD_RELEASE=202001061940
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 \
        com.redhat.component="telemeter-container" \
        io.openshift.build.commit.url="https://github.com/openshift/telemeter/commit/a10bf72789cbeac43a4d9d3721ccbba06e70fd5e" \
        version="v4.1.30" \
        name="openshift/ose-telemeter" \
        io.openshift.build.commit.id="a10bf72789cbeac43a4d9d3721ccbba06e70fd5e" \
        release="202001061940" \
        io.openshift.build.source-location="https://github.com/openshift/telemeter"

