我正在尝试启动一个 zookeeper 实例和一个使用 docker-compose (docker-compose.yml 文件中的内容) 连接到 zookeeper 实例的进程。一旦 docker 为两个实体获取存储库并启动 zookeeper 实例,它就无法将进程连接到 zookeeper 实例并优雅地停止整个设置并抛出此错误 -
{
abc_1 | "warnings" : [],
abc_1| "diskperms" : {},
abc_1 | "diskspace" : {},
abc_1 | "data" : [],
abc_1 | "log" : [
abc_1 | "[ERROR] [28] Local-disk package '/packages/xyz.tar.gz' does not exist on disk."
abc_1 | ],
abc_1 | "http_info" : {},
abc_1 | "result" : {
abc_1 | "msg" : "Local-disk package '/packages/xyz.tar.gz' does not exist on disk.",
abc_1 | "status" : 1
abc_1 | },
abc_1 | "state" : {}
abc_1 | }
dockerzookeeper1_abc_1 exited with code 1
Gracefully stopping... (press Ctrl+C again to force)
Stopping dockerzookeeper1_zookeeper_1...
有人能告诉我如何用 docker-compose 解决这个问题吗?
Dockerfile -
码头文件看起来像这样 -
FROM debian:jessie
RUN apt-get update && apt-get install -y openjdk-7-jre-headless wget
RUN wget -q -O - http://apache.mirrors.pair.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz | tar -xzf - -C /opt \
&& mv /opt/zookeeper-3.4.6 /opt/zookeeper \
&& cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg \
&& mkdir -p /tmp/zookeeper
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
EXPOSE 2181 2888 3888
WORKDIR /opt/zookeeper
VOLUME ["/opt/zookeeper/conf", "/tmp/zookeeper"]
ENTRYPOINT ["/opt/zookeeper/bin/zkServer.sh"]
CMD ["start-foreground"