#!/usr/bin/bash
tar cv --files-from /dev/null | docker import - scratch

cat <<DF > Dockerfile
FROM scratch
ADD etcd /
ADD etcdctl /
EXPOSE 4001 7001 2379 2380
ENTRYPOINT ["/etcd"]
DF

docker build -t quay.io/coreos/etcd:${1} .
