首页 > 解决方案 > 当我在 minishift 上运行 test-dev 时,Apache NiFi 没有构建

问题描述

当我尝试根据 minishift 上的 DockerFile 代码构建以下链接时,它无法成功运行。有什么想法可以解决吗?

DockerFile 的链接;

https://github.com/rromannissen/nifi-openshift/blob/master/base/Dockerfile

++编辑Dockerfile;

USER root
WORKDIR ${NIFI_HOME}
RUN chmod +x start.sh
ENTRYPOINT ["../scripts/start.sh"]

还是没建...

错误一:

Removing intermediate container b4e143597109
Step 23/24 : RUN chmod +x start.sh
 ---> Running in c5ebd4bae255

    chmod: cannot access '/start.sh': No such file or directory
    Removing intermediate container e55eb176f952
    The command '/bin/sh -c chmod +x /start.sh' returned a non-zero code:1

输出的详细问题:

    Removing intermediate container b4e143597109
    Step 23/24 : RUN chmod +x start.sh
     ---> Running in c5ebd4bae255
    
    chmod: cannot access 'start.sh': No such file or directory
    Removing intermediate container c5ebd4bae255
    The command '/bin/sh -c chmod +x start.sh' returned a non-zero code: 1
    keremceliker@kerems-mbp nifi % 

谢谢, 凯雷姆 Çeliker

标签: linuxdockeropenshiftapache-nifiminishift

解决方案


要在该 bash 脚本上执行 chmod +x,您需要指定正确的路径。我认为这个 Dockerfile 是'../scripts/start.sh'。要确定正确的路径,您可以运行 Docker 直到该步骤,然后输入它并确定那里需要什么路径。


推荐阅读