A_Sammy
A_Sammy

Reputation: 31

NIFI custom image run error "../scripts/start.sh: no such file or directory"

I am trying to build a docker image using NIFI with a mysql java connector jar. Here is my Dockerfile code:

FROM apache/nifi:1.12.0
RUN mkdir /opt/nifi/nifi-current/custom-jar
WORKDIR /opt/nifi/nifi-current/custom-jar
RUN wget http://www.java2s.com/Code/JarDownload/mysql/mysql-connector-java-5.1.17-bin.jar.zip
RUN unzip mysql-connector-java-5.1.17-bin.jar.zip

The image builds without error, but when I try to run the image, I get this error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "../scripts/start.sh": stat ../scripts/start.sh: no such file or directory: unknown.

What is this about?

Upvotes: 1

Views: 999

Answers (1)

yaprak
yaprak

Reputation: 547

I believe this is caused by wrong working directory. Try to change working directory to what used to be after your operation, or do not touch it if possible

refer to this

WORKDIR /opt/nifi/nifi-current

Upvotes: 1

Related Questions