2016-10-08 03:26:38 +02:00
|
|
|
FROM java:8-alpine
|
2016-03-22 05:00:30 +01:00
|
|
|
|
2018-04-26 17:39:30 +02:00
|
|
|
ENV ZOOKEEPER_VERSION 3.4.12
|
2016-03-22 05:00:30 +01:00
|
|
|
ENV PATH $PATH:/opt/zookeeper/bin/
|
|
|
|
|
|
|
|
# the start files for zookeeper use bash
|
2016-06-06 05:40:20 +02:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
bash
|
2016-03-22 05:00:30 +01:00
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
curl \
|
|
|
|
' \
|
|
|
|
&& echo "==> Installing dependencies..." \
|
2016-06-06 05:40:20 +02:00
|
|
|
&& apk --no-cache add --virtual build-deps $buildDeps \
|
2016-03-22 05:00:30 +01:00
|
|
|
&& echo "==> Downloading Zookeeper..." \
|
|
|
|
&& mkdir -p /opt \
|
2018-01-01 21:47:03 +01:00
|
|
|
&& curl -sSL "http://apache.mirrors.pair.com/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz" | tar -xzf - -C /opt \
|
2016-03-22 05:00:30 +01:00
|
|
|
&& mv /opt/zookeeper-${ZOOKEEPER_VERSION} /opt/zookeeper \
|
2016-06-06 05:40:20 +02:00
|
|
|
&& cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg \
|
|
|
|
&& apk del build-deps
|
2016-03-22 05:00:30 +01:00
|
|
|
|
|
|
|
ENTRYPOINT ["zkServer.sh", "start-foreground"]
|