forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (20 loc) · 907 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
FROM centos:centos7
MAINTAINER http://openshift.io
RUN yum install -y tar bind-utils && yum clean all
ENV ETCD_RELEASE v2.0.10
LABEL k8s.io/description="A highly-available key-value store for shared configuration and service discovery" \
k8s.io/display-name="etcd v2.0.10" \
openshift.io/expose-services="2379:http,2380:etcd" \
openshift.io/tags="database,etcd,etcd20"
RUN ETCD_URL=https://github.com/coreos/etcd/releases/download/${ETCD_RELEASE}/etcd-${ETCD_RELEASE}-linux-amd64.tar.gz && \
mkdir -p /tmp/etcd && cd /tmp/etcd && \
curl -L ${ETCD_URL} | tar -xzf - --strip-components=1 && \
mv {etcd,etcdctl} /usr/local/bin/ && \
mkdir -p /var/lib/etcd && \
rm -rf /tmp/etcd
EXPOSE 2379 2380
# Make the datadir world writeable
RUN mkdir -p /var/lib/etcd && chmod go+rwx /var/lib/etcd
VOLUME ["/var/lib/etcd"]
COPY etcd*.sh /usr/local/bin/
CMD ["/usr/local/bin/etcd.sh"]