Reputation: 361
I need to update a docker stack containing a container for Apache Accumulo and one for Zookeeper. The old Dockerfile for Accumulo is something like this.
FROM hdfs-custom-image
ARG TAG
ARG ZOOKEEPER_VERSION
ARG ACCUMULO_VERSION
# Install Zookeeper
ENV ZOOKEEPER_VERSION ${ZOOKEEPER_VERSION}
ENV ZOOKEEPER_HOME /opt/zookeeper
ENV ZOOKEEPER_DATA /data/zookeeper
ENV ZOOKEEPER_CONF_DIR $ZOOKEEPER_HOME/conf
ENV ZOO_LOG4J_PROP WARN,CONSOLE
ENV PATH $PATH:$ZOOKEEPER_HOME/bin
ENV ACCUMULO_HOME=/opt/accumulo
ENV PATH="$PATH:/opt/accumulo/bin"
RUN set -x \
&& mkdir -p $ZOOKEEPER_HOME $ZOOKEEPER_DATA \
&& curl -# https://archive.apache.org/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/apache-zookeeper-${ZOOKEEPER_VERSION}.tar.gz \
| tar -xz -C ${ZOOKEEPER_HOME} --strip-components=1
# Install Accumulo
ENV ACCUMULO_VERSION ${ACCUMULO_VERSION}
ENV ACCUMULO_HOME /opt/accumulo
ENV ACCUMULO_CONF_DIR $ACCUMULO_HOME/conf
ENV PATH=$PATH:$ACCUMULO_HOME/bin
ADD accumulo-${ACCUMULO_VERSION}-bin.tar.gz /opt
RUN set -x \
&& mv /opt/accumulo-${ACCUMULO_VERSION} ${ACCUMULO_HOME} \
&& yum install -y make gcc-c++ \
# && bash -c "${ACCUMULO_HOME}/bin/build_native_library.sh" \ # This file is not present in Accumulo-2.0.1
&& yum -y autoremove gcc-c++
WORKDIR "${ACCUMULO_HOME}"
COPY ./fs/sbin /sbin
COPY ./fs/opt /opt
ENTRYPOINT [ "/sbin/entrypoint.sh" ]
This works for Accumulo version 1.9.3 and Zookeeper version 3.4.8. I am trying to upgrade the versions to 2.0.1 and 3.8.1, respectively, but Accumulo fails to detect Zookeeper. The reason is explained in the official Accumulo guide.
https://accumulo.apache.org/release/accumulo-2.0.1/
I have tried setting some environment variables differently, but Accumulo still does not detect Zookeeper. Are there any configurations to add or change in the Dockerfile or docker-compose?
Upvotes: 0
Views: 86