FROM openshift/golang-builder:1.12 AS builder
ENV __doozer=update BUILD_RELEASE=202005041055 BUILD_VERSION=v4.3.19 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=19 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.19-202005041055 
ENV __doozer=merge OS_GIT_COMMIT=e30a18f OS_GIT_VERSION=4.3.19-202005041055-e30a18f SOURCE_DATE_EPOCH=1571886918 SOURCE_GIT_COMMIT=e30a18f29c8bf1f16507d7983dde2aa51962d6c7 SOURCE_GIT_TAG=e30a18f29 SOURCE_GIT_URL=https://github.com/openshift/etcd 

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

COPY . .

RUN ./build

# stage 2
FROM openshift/ose-base:v4.3.19.20200504.105538
ENV __doozer=update BUILD_RELEASE=202005041055 BUILD_VERSION=v4.3.19 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=19 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.19-202005041055 
ENV __doozer=merge OS_GIT_COMMIT=e30a18f OS_GIT_VERSION=4.3.19-202005041055-e30a18f SOURCE_DATE_EPOCH=1571886918 SOURCE_GIT_COMMIT=e30a18f29c8bf1f16507d7983dde2aa51962d6c7 SOURCE_GIT_TAG=e30a18f29 SOURCE_GIT_URL=https://github.com/openshift/etcd 

ENTRYPOINT ["/usr/bin/etcd"]

COPY --from=builder /go/src/github.com/coreos/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/github.com/coreos/etcd/bin/etcdctl /usr/bin/

LABEL \
        io.k8s.display-name="etcd server" \
        io.k8s.description="etcd is distributed key-value store which stores the persistent master state for Kubernetes and OpenShift." \
        maintainer="Sam Batschelet <sbatsche@redhat.com>" \
        License="Apache 2.0" \
        io.openshift.tags="etcd" \
        name="openshift/ose-etcd" \
        com.redhat.component="ose-etcd-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        version="v4.3.19" \
        release="202005041055" \
        io.openshift.build.commit.id="e30a18f29c8bf1f16507d7983dde2aa51962d6c7" \
        io.openshift.build.source-location="https://github.com/openshift/etcd" \
        io.openshift.build.commit.url="https://github.com/openshift/etcd/commit/e30a18f29c8bf1f16507d7983dde2aa51962d6c7"

