如何在Docker compose中使用ELK Stack中的Entrypoint.sh?

时间:2019-04-09 09:14:49

标签: bash docker elasticsearch

我的问题与Docker compose等待Kibana直到Elasticsearch搁浅有关。之后,Kibana将启动,下面为该问题编写的代码如下。但是它创建了一个错误:

**Step 6/6 : RUN chmod +x entrypoint.sh
---> Running in 2e2d9c229ced
standard_init_linux.go:207: exec user process caused "exec format error"
ERROR: Service 'kibana' failed to build: The command '/bin/sh -c chmod +x entrypoint.sh' returned a non-zero code**

Kibana中的Dockerfile:

FROM docker.elastic.co/kibana/kibana:6.6.2

COPY ./config/kibana.yml /opt/kibana/config/kibana.yml

COPY entrypoint.sh entrypoint.sh

USER root

ENTRYPOINT ["sh", "/entrypoint.sh"]

RUN chmod +x entrypoint.sh

entrypoint.sh:在kibana中

# Wait for the Elasticsearch container to be ready before starting Kibana.

    echo "Stalling for Elasticsearch"
    while true; do
    nc -q 1 elasticsearch 9200 2>/dev/null && break 
    done

    echo "Starting Kibana"
   /usr/local/bin/kibana-docker

0 个答案:

没有答案