File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM alpine:3.1
22
33# install common packages
4- RUN apk add --update-cache curl bash sudo && rm -rf /var/cache/apk/*
4+ RUN apk add --update-cache curl tar && rm -rf /var/cache/apk/*
55
6- # install etcdctl
7- RUN curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \
8- && chmod +x /usr/local/bin/etcdctl
6+ ENV ETCD_VERSION v0.4.9
97
10- # build etcd and then clean up
11- RUN buildDeps='curl git-core' ; \
12- set -x; \
13- apt-get update && apt-get install -y $buildDeps --no-install-recommends \
14- && curl -sSL https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local -xz \
15- && git clone -q https://github.com/coreos/etcd.git /opt/etcd \
16- && cd /opt/etcd && git checkout -q v0.4.6 && PATH=/usr/local/go/bin:$PATH ./build \
17- && cp /opt/etcd/bin/etcd /usr/local/bin \
18- && cd && rm -rf /usr/local/go /opt/etcd \
19- && apt-get purge -y $buildDeps \
20- && apt-get autoremove -y && apt-get clean
8+ # install etcd and etcdctl
9+ RUN curl -sSL https://github.com/coreos/etcd/releases/download/$ETCD_VERSION/etcd-$ETCD_VERSION-linux-amd64.tar.gz \
10+ | tar -vxz -C /usr/local/bin --strip=1
2111
2212EXPOSE 4001 7001
2313CMD ["/usr/local/bin/etcd" ]
You can’t perform that action at this time.
0 commit comments