FROM openshift/golang-builder:1.12 AS build
ENV __doozer=update BUILD_RELEASE=202006290519.p0 BUILD_VERSION=v4.3.28 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=28 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.28-202006290519.p0 
ENV __doozer=merge OS_GIT_COMMIT=f4c88d6 OS_GIT_VERSION=4.3.28-202006290519.p0-f4c88d6 SOURCE_DATE_EPOCH=1576258605 SOURCE_GIT_COMMIT=f4c88d69c64e79f5d12ca30804d4f7f143cb0282 SOURCE_GIT_TAG=v2.8.2-17-gf4c88d69 SOURCE_GIT_URL=https://github.com/kube-reporting/helm 

RUN yum install --setopt=skip_missing_names_on_install=False -y \
        hg git make \
    && yum clean all \
    && rm -rf /var/cache/yum

ENV GOPATH /go

RUN mkdir -p /go/src/k8s.io/helm
WORKDIR /go/src/k8s.io/helm
COPY . .

# unset VERSION inherited from base before building
ENV VERSION ""
RUN make build
RUN make docker-binary

FROM openshift/ose-base:ubi7
ENV __doozer=update BUILD_RELEASE=202006290519.p0 BUILD_VERSION=v4.3.28 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=28 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.28-202006290519.p0 
ENV __doozer=merge OS_GIT_COMMIT=f4c88d6 OS_GIT_VERSION=4.3.28-202006290519.p0-f4c88d6 SOURCE_DATE_EPOCH=1576258605 SOURCE_GIT_COMMIT=f4c88d69c64e79f5d12ca30804d4f7f143cb0282 SOURCE_GIT_TAG=v2.8.2-17-gf4c88d69 SOURCE_GIT_URL=https://github.com/kube-reporting/helm 

COPY --from=build /go/src/k8s.io/helm/rootfs/tiller /usr/local/bin
COPY --from=build /go/src/k8s.io/helm/bin/helm /usr/local/bin
RUN ln -s /usr/local/bin/tiller /tiller

LABEL \
        io.k8s.display-name="OpenShift metering-helm" \
        io.k8s.description="This is a base image used by operator-metering to assist in managing the lifecycle of the Openshift Metering components." \
        io.openshift.tags="openshift" \
        maintainer="Chance Zibolski <czibolsk@redhat.com>" \
        name="openshift/ose-metering-helm" \
        com.redhat.component="ose-metering-helm-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Metering Operator" \
        release="202006290519.p0" \
        io.openshift.build.commit.id="f4c88d69c64e79f5d12ca30804d4f7f143cb0282" \
        io.openshift.build.source-location="https://github.com/kube-reporting/helm" \
        io.openshift.build.commit.url="https://github.com/kube-reporting/helm/commit/f4c88d69c64e79f5d12ca30804d4f7f143cb0282" \
        version="v4.3.28"

