FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202011132159.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202011132159.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=e61c574 OS_GIT_VERSION=4.4.0-202011132159.p0-e61c574 SOURCE_DATE_EPOCH=1580542581 SOURCE_GIT_COMMIT=e61c574c85e4309f867e6ac0b147cf3f15a07359 SOURCE_GIT_TAG=e61c574 SOURCE_GIT_URL=https://github.com/openshift/kubecsr 

WORKDIR /go/src/github.com/coreos/kubecsr

COPY . .

RUN make bin/kube-client-agent

# stage 2
FROM openshift/ose-base:v4.4.0-202011122017.p0
ENV __doozer=update BUILD_RELEASE=202011132159.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202011132159.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=e61c574 OS_GIT_VERSION=4.4.0-202011132159.p0-e61c574 SOURCE_DATE_EPOCH=1580542581 SOURCE_GIT_COMMIT=e61c574c85e4309f867e6ac0b147cf3f15a07359 SOURCE_GIT_TAG=e61c574 SOURCE_GIT_URL=https://github.com/openshift/kubecsr 

ENTRYPOINT ["/usr/bin/kube-client-agent"]

COPY --from=builder /go/src/github.com/coreos/kubecsr/bin/kube-client-agent /usr/bin/

LABEL \
        io.k8s.display-name="kube-client-agent" \
        io.k8s.description="This client agent generates a valid CSR according to the configuration flags provided to it." \
        maintainer="Sam Batschelet <sbatsche@redhat.com>" \
        License="Apache 2.0" \
        io.openshift.tags="kube-client-agent" \
        name="openshift/ose-kube-client-agent" \
        com.redhat.component="ose-kube-client-agent-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        release="202011132159.p0" \
        io.openshift.build.commit.id="e61c574c85e4309f867e6ac0b147cf3f15a07359" \
        io.openshift.build.source-location="https://github.com/openshift/kubecsr" \
        io.openshift.build.commit.url="https://github.com/openshift/kubecsr/commit/e61c574c85e4309f867e6ac0b147cf3f15a07359" \
        version="v4.4.0"

