-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathDockerfile
30 lines (19 loc) · 820 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
30
# Apache Zookeeper
FROM openjdk:8-jre-alpine
ARG ZOOKEEPER_VERSION=3.4.10
ARG ZOOKEEPER_MIRROR=http://www-eu.apache.org
LABEL name="zookeeper" version=${ZOOKEEPER_VERSION}
ADD ./src /
RUN chmod +x /usr/local/sbin/start.sh
RUN apk add --no-cache wget bash
RUN mkdir /opt \
&& wget -q -O - ${ZOOKEEPER_MIRROR}/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz | tar -xzf - -C /opt \
&& mv /opt/zookeeper-* /opt/zookeeper \
&& chown -R root:root /opt/zookeeper
RUN addgroup -S zookeeper \
&& adduser -h /var/lib/zookeeper -G zookeeper -S -H -s /sbin/nologin zookeeper \
&& mkdir /var/lib/zookeeper \
&& chown -R zookeeper:zookeeper /var/lib/zookeeper
EXPOSE 2181 2888 3888
VOLUME ["/opt/zookeeper/conf", "/var/lib/zookeeper"]
ENTRYPOINT ["/usr/local/sbin/start.sh"]