FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202012050338.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202012050338.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=c821779 OS_GIT_VERSION=4.5.0-202012050338.p0-c821779 SOURCE_DATE_EPOCH=1596811032 SOURCE_GIT_COMMIT=c821779c605a2f3369eafafcccef22a70c6b76fe SOURCE_GIT_TAG=atomic-openshift-cluster-autoscaler-4.0.0-0.147.0-2689-gc821779c6 SOURCE_GIT_URL=https://github.com/openshift/kubernetes-autoscaler 
WORKDIR /go/src/k8s.io/autoscaler/vertical-pod-autoscaler
COPY . .
RUN go build ./pkg/admission-controller
RUN go build ./pkg/updater
RUN go build ./pkg/recommender

FROM openshift/ose-base:v4.5.0.20201205.044256
ENV __doozer=update BUILD_RELEASE=202012050338.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202012050338.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=c821779 OS_GIT_VERSION=4.5.0-202012050338.p0-c821779 SOURCE_DATE_EPOCH=1596811032 SOURCE_GIT_COMMIT=c821779c605a2f3369eafafcccef22a70c6b76fe SOURCE_GIT_TAG=atomic-openshift-cluster-autoscaler-4.0.0-0.147.0-2689-gc821779c6 SOURCE_GIT_URL=https://github.com/openshift/kubernetes-autoscaler 
COPY --from=builder \
    /go/src/k8s.io/autoscaler/vertical-pod-autoscaler/admission-controller \
    /go/src/k8s.io/autoscaler/vertical-pod-autoscaler/updater \
    /go/src/k8s.io/autoscaler/vertical-pod-autoscaler/recommender \
    /usr/bin/

LABEL \
        summary="Vertical Pod Autoscaler for OpenShift and Kubernetes" \
        name="openshift/ose-vertical-pod-autoscaler-rhel7" \
        com.redhat.component="ose-vertical-pod-autoscaler-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        release="202012050338.p0" \
        io.openshift.build.commit.id="c821779c605a2f3369eafafcccef22a70c6b76fe" \
        io.openshift.build.source-location="https://github.com/openshift/kubernetes-autoscaler" \
        io.openshift.build.commit.url="https://github.com/openshift/kubernetes-autoscaler/commit/c821779c605a2f3369eafafcccef22a70c6b76fe" \
        version="v4.5.0"

