Skip to content

Commit

Permalink
Build etcd image and push it to gcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
dchen1107 committed Apr 2, 2015
1 parent c627a35 commit 1f3b5bf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cluster/images/etcd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM scratch
MAINTAINER Dawn Chen <dawnchen@google.com>

ADD ./etcd /usr/local/bin/etcd
ADD ./etcdctl /usr/local/bin/etcdctl
20 changes: 20 additions & 0 deletions cluster/images/etcd/Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1f3b5bf

Please sign in to comment.