123456789101112131415161718192021222324 |
- #!/usr/bin/env bash
- if [ "$#" -ne 1 ]; then
- echo "Usage: $0 VERSION" >&2
- exit 1
- fi
- VERSION=${1}
- BINARYDIR=${BINARYDIR:-.}
- BUILDDIR=${BUILDDIR:-.}
- IMAGEDIR=${BUILDDIR}/image-docker
- mkdir -p ${IMAGEDIR}
- cp ${BINARYDIR}/etcd ${BINARYDIR}/etcdctl ${IMAGEDIR}
- cat ./Dockerfile-release > ${IMAGEDIR}/Dockerfile
- if [ -z "$TAG" ]; then
- docker build -t "gcr.io/etcd-development/etcd:${VERSION}" "${IMAGEDIR}"
- docker build -t "quay.io/coreos/etcd:${VERSION}" "${IMAGEDIR}"
- else
- docker build -t "${TAG}:${VERSION}" "${IMAGEDIR}"
- fi
|