Build etcd image and push it to gcr.io

This commit is contained in:
Dawn Chen
2015-04-02 16:20:09 -07:00
parent c627a3598c
commit 1f3b5bf2f0
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
FROM scratch
MAINTAINER Dawn Chen <dawnchen@google.com>
ADD ./etcd /usr/local/bin/etcd
ADD ./etcdctl /usr/local/bin/etcdctl

View File

@@ -0,0 +1,20 @@
.PHONY: clean build push
IMAGE = etcd
TAG = 2.0.8
OUTPUT_DIR = $(IMAGE)-v$(TAG)-linux-amd64
clean:
rm -rf $(OUTPUT_DIR) $(IMAGE)-v$(TAG)-linux-amd64.tar.gz etcd etcdctl
build: clean
curl -L -O https://github.com/coreos/etcd/releases/download/v$(TAG)/$(IMAGE)-v$(TAG)-linux-amd64.tar.gz
tar xzvf $(IMAGE)-v$(TAG)-linux-amd64.tar.gz
cp $(OUTPUT_DIR)/etcd .
cp $(OUTPUT_DIR)/etcdctl .
docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) .
push: build
gcloud preview docker push gcr.io/google_containers/$(IMAGE):$(TAG)
all: push