FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=9b2cf49e8663d9b117f4255f5aa90416ae113b54 SOURCE_DATE_EPOCH=1556839934 BUILD_VERSION=v4.1.25 SOURCE_GIT_URL=https://github.com/openshift/kubernetes-autoscaler SOURCE_GIT_TAG=atomic-openshift-cluster-autoscaler-4.0.0-0.147.0-167-g9b2cf49e BUILD_RELEASE=201911190028
WORKDIR /go/src/k8s.io/autoscaler
COPY . .
RUN go build -o cluster-autoscaler/cluster-autoscaler ./cluster-autoscaler

FROM openshift/ose-base:ubi7
ENV SOURCE_GIT_COMMIT=9b2cf49e8663d9b117f4255f5aa90416ae113b54 SOURCE_DATE_EPOCH=1556839934 BUILD_VERSION=v4.1.25 SOURCE_GIT_URL=https://github.com/openshift/kubernetes-autoscaler SOURCE_GIT_TAG=atomic-openshift-cluster-autoscaler-4.0.0-0.147.0-167-g9b2cf49e BUILD_RELEASE=201911190028
COPY --from=builder /go/src/k8s.io/autoscaler/cluster-autoscaler/cluster-autoscaler /usr/bin/
CMD /usr/bin/cluster-autoscaler

LABEL \
        io.k8s.description="Cluster Autoscaler for OpenShift and Kubernetes." \
        com.redhat.component="atomic-openshift-cluster-autoscaler-container" \
        vendor="Red Hat" \
        name="openshift/ose-cluster-autoscaler" \
        License="ASL 2.0" \
        io.k8s.display-name="OpenShift Container Platform Cluster Autoscaler" \
        io.openshift.build.source-location="https://github.com/openshift/kubernetes-autoscaler" \
        summary="Cluster Autoscaler for OpenShift and Kubernetes" \
        io.openshift.build.commit.url="https://github.com/openshift/kubernetes-autoscaler/commit/9b2cf49e8663d9b117f4255f5aa90416ae113b54" \
        version="v4.1.25" \
        io.openshift.build.commit.id="9b2cf49e8663d9b117f4255f5aa90416ae113b54" \
        release="201911190028" \
        io.openshift.tags="openshift,autoscaler"

