I am trying to create docker containers for ZooKeeper and configure them in cluster mode (full code is here and here).
Containers are based on Alpine Linux (alpine:3
I managed to get rid of the DNS issues by switching to Oracle JRE 8 and using the following hack in the Dockerfile:
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
I created a working Java 8 docker container container on Docker Hub (the code is on github).