2018-01-01 18:59:52 +01:00
|
|
|
FROM java:8-alpine
|
|
|
|
|
2019-05-25 23:47:15 +02:00
|
|
|
ENV ZOOKEEPER_VERSION 3.5.5
|
2018-01-01 18:59:52 +01:00
|
|
|
ENV PATH $PATH:/opt/zookeeper/bin/
|
|
|
|
|
|
|
|
# the start files for zookeeper use bash
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
bash
|
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
curl \
|
2018-05-22 02:27:26 +02:00
|
|
|
tar \
|
2018-01-01 18:59:52 +01:00
|
|
|
' \
|
|
|
|
&& echo "==> Installing dependencies..." \
|
|
|
|
&& apk --no-cache add --virtual build-deps $buildDeps \
|
|
|
|
&& echo "==> Downloading Zookeeper..." \
|
|
|
|
&& mkdir -p /opt \
|
2019-05-25 23:47:15 +02:00
|
|
|
&& curl -sSL "http://apache.osuosl.org/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/apache-zookeeper-${ZOOKEEPER_VERSION}.tar.gz" | tar -xzf - -C /opt \
|
|
|
|
&& mv /opt/apache-zookeeper-${ZOOKEEPER_VERSION} /opt/zookeeper \
|
2018-01-01 18:59:52 +01:00
|
|
|
&& cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg \
|
|
|
|
&& apk del build-deps
|
|
|
|
|
|
|
|
ENTRYPOINT ["zkServer.sh", "start-foreground"]
|