FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202007172106.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-202007172106.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=e61c574 OS_GIT_VERSION=4.5.0-202007172106.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-etcd-signer-server

# stage 2
FROM openshift/ose-base:v4.5.0.20200717.210802
ENV __doozer=update BUILD_RELEASE=202007172106.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-202007172106.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=e61c574 OS_GIT_VERSION=4.5.0-202007172106.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-etcd-signer-server"]

COPY --from=builder /go/src/github.com/coreos/kubecsr/bin/kube-etcd-signer-server /usr/bin/

LABEL \
        io.k8s.display-name="kube-etcd-signer-server" \
        io.k8s.description="The certificate signer approves a given valid CSR provided by the client agent and returns a signed certificate." \
        maintainer="Sam Batschelet <sbatsche@redhat.com>" \
        License="Apache 2.0" \
        io.openshift.tags="kube-etcd-signer-server" \
        name="openshift/ose-kube-etcd-signer-server" \
        com.redhat.component="ose-kube-etcd-signer-server-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        release="202007172106.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.5.0"

