Build etcd image from busybox

pull/6/head
Abhishek Shah 2015-06-08 16:34:27 -07:00
parent e497793de2
commit 193e078808
2 changed files with 8 additions and 7 deletions

View File

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

View File

@ -1,20 +1,21 @@
.PHONY: clean build push
IMAGE = etcd
TAG = 2.0.9
OUTPUT_DIR = $(IMAGE)-v$(TAG)-linux-amd64
TAG = 2.0.9.1
ETCD_VERSION = 2.0.9
OUTPUT_DIR = $(IMAGE)-v$(ETCD_VERSION)-linux-amd64
clean:
rm -rf $(OUTPUT_DIR) $(IMAGE)-v$(TAG)-linux-amd64.tar.gz etcd etcdctl
rm -rf $(OUTPUT_DIR) $(IMAGE)-v$(ETCD_VERSION)-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
curl -L -O https://github.com/coreos/etcd/releases/download/v$(ETCD_VERSION)/$(IMAGE)-v$(ETCD_VERSION)-linux-amd64.tar.gz
tar xzvf $(IMAGE)-v$(ETCD_VERSION)-linux-amd64.tar.gz
cp $(OUTPUT_DIR)/etcd .
cp $(OUTPUT_DIR)/etcdctl .
docker build -t gcr.io/google_containers/$(IMAGE):$(TAG) .
push: build
push: build
gcloud preview docker push gcr.io/google_containers/$(IMAGE):$(TAG)
all: push