-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (36 loc) · 1.29 KB
/
Dockerfile
File metadata and controls
49 lines (36 loc) · 1.29 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM java:openjdk-8-jre
MAINTAINER Adam Harper <docker@adam-harper.com>
# Update system and install supervisord
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y wget \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install Zookeeper from official binary release
ENV APACHE_MIRROR http://mirror.ox.ac.uk/sites/rsync.apache.org
ENV ZK_VERSION 3.5.3-beta
RUN cd /tmp \
&& wget -q $APACHE_MIRROR/zookeeper/zookeeper-$ZK_VERSION/zookeeper-$ZK_VERSION.tar.gz
RUN mkdir -p /opt \
&& tar xf /tmp/zookeeper-$ZK_VERSION.tar.gz -C /opt \
&& ln -s /opt/zookeeper-$ZK_VERSION /opt/zookeeper \
&& mkdir -p /data
RUN rm /tmp/*.tar.gz
# copy configuration files
COPY etc/zoo.cfg /opt/zookeeper/conf/
# expose zookeeper follower, election, client, HTTP, and JMX
EXPOSE 2172 2173 2181 8080 7000
# set service names for registrator
ENV SERVICE_2172_NAME zookeeper-follower
ENV SERVICE_2173_NAME zookeeper-election
ENV SERVICE_2181_NAME zookeeper
ENV SERVICE_8080_NAME zookeeper-admin
ENV SERVICE_7000_NAME jmx
# register a consul health check against the admin server
ENV SERVICE_8080_CHECK_HTTP=/commands/ruok
# expose mount points for service data
VOLUME /data
# setup runtime environment
COPY bin/* /usr/local/bin/
RUN chmod +x /usr/local/bin/*
CMD ["/usr/local/bin/start", "", ""]