Skip to content

Commit e9d9859

Browse files
committed
fix(tests/fixtures): use env var for test-etcd version
1 parent d486c84 commit e9d9859

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
FROM 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

2212
EXPOSE 4001 7001
2313
CMD ["/usr/local/bin/etcd"]

0 commit comments

Comments
 (0)