2018-01-01 18:59:52 +01:00
|
|
|
FROM java:8-alpine
|
|
|
|
|
2019-03-08 17:09:18 +01:00
|
|
|
ENV ZOOKEEPER_VERSION 3.5.4-beta
|
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-03-08 17:09:18 +01:00
|
|
|
&& curl -sSL "http://apache.osuosl.org/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz" | tar -xzf - -C /opt \
|
2018-01-01 18:59:52 +01:00
|
|
|
&& mv /opt/zookeeper-${ZOOKEEPER_VERSION} /opt/zookeeper \
|
|
|
|
&& cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg \
|
|
|
|
&& apk del build-deps
|
|
|
|
|
|
|
|
ENTRYPOINT ["zkServer.sh", "start-foreground"]
|