FROM openshift/golang-builder:rhel_8_golang_1.16
ENV __doozer=update BUILD_RELEASE=202110121407.p0.git.eabad55.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202110121407.p0.git.eabad55.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=eabad55 OS_GIT_VERSION=4.8.0-202110121407.p0.git.eabad55.assembly.stream-eabad55 SOURCE_DATE_EPOCH=1633534625 SOURCE_GIT_COMMIT=eabad556e8759422b85b2f27248c52626245f1ba SOURCE_GIT_TAG=v3.11.0-806-geabad556 SOURCE_GIT_URL=https://github.com/openshift/telemeter 
ENV GOFLAGS="-mod=vendor"
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.8.0.20211012.143747
ENV __doozer=update BUILD_RELEASE=202110121407.p0.git.eabad55.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202110121407.p0.git.eabad55.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=eabad55 OS_GIT_VERSION=4.8.0-202110121407.p0.git.eabad55.assembly.stream-eabad55 SOURCE_DATE_EPOCH=1633534625 SOURCE_GIT_COMMIT=eabad556e8759422b85b2f27248c52626245f1ba SOURCE_GIT_TAG=v3.11.0-806-geabad556 SOURCE_GIT_URL=https://github.com/openshift/telemeter 

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 \
        io.k8s.display-name="OpenShift Telemeter" \
        io.k8s.description="" \
        io.openshift.tags="openshift,monitoring" \
        summary="" \
        maintainer="OpenShift Monitoring Team <team-monitoring@redhat.com>" \
        name="openshift/ose-telemeter" \
        com.redhat.component="telemeter-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="202110121407.p0.git.eabad55.assembly.stream" \
        io.openshift.build.commit.id="eabad556e8759422b85b2f27248c52626245f1ba" \
        io.openshift.build.source-location="https://github.com/openshift/telemeter" \
        io.openshift.build.commit.url="https://github.com/openshift/telemeter/commit/eabad556e8759422b85b2f27248c52626245f1ba" \
        version="v4.8.0"

