-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
29 lines (20 loc) · 853 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Dockerfile for running an etcd (primarily in Kubernetes)
FROM ubuntu:trusty
MAINTAINER Graeme Johnson <[email protected]>
RUN \
sed 's/main$/main universe/' -i /etc/apt/sources.list && \
apt-get update && \
env DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common python-software-properties curl
RUN \
cd /tmp && \
(curl -L https://github.com/coreos/etcd/releases/download/v0.4.6/etcd-v0.4.6-linux-amd64.tar.gz | tar -xz) && \
mkdir -p /opt/etcd/bin && \
cp -v /tmp/etcd-v0.4.6-linux-amd64/etcd /opt/etcd/bin && \
cp -v /tmp/etcd-v0.4.6-linux-amd64/etcdctl /opt/etcd/bin && \
rm -rf /tmp/etcd-v0.4.6-linux-amd64
WORKDIR /opt/etcd
EXPOSE 4001 7001
VOLUME ["/opt/etcd/conf", "/opt/etcd/data", "/opt/etcd/log"]
ADD config-and-run.sh /opt/etcd/bin/
ENTRYPOINT ["/opt/etcd/bin/config-and-run.sh"]
CMD [""]