I am trying to build and run a custom version of n8n with Docker. So I used the Dockerfile provided by the n8n’s team for custom version, the build works fine but when I execute docker run, it shows me this error : [FATAL tini (7)] exec /docker-entrypoint.sh failed: No such file or directory
Here the exact command I ran to get this error (in the root directory of my custom n8n version) : docker run -it --rm --name n8n-similarity -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8n-custom
(I used docker build -t n8n-custom -f docker\images\n8n-custom\Dockerfile . to create the Docker image)
First I believed this error was due to my code modifications, so I also tried this build & run with the original n8n code, and the result is the same.
This post ends by creating the Dockerfile I just used, and it doesn’t work for me.
The Dockerfile has an instruction COPY docker/images/n8n-custom/docker-entrypoint.sh /docker-entrypoint.sh, so I don’t understand why Docker can’t find the docker-entrypoint.sh file…
Thank you for your anwser @jan ,
I run these two commands in the n8n root folder.
Here the exact commands I run : cd C:\Users\...\Developpement\n8n docker build -t n8n-custom -f docker\images\n8n-custom\Dockerfile . (no error here, status: FINISHED) docker run -it --rm --name n8n-similarity -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8n-custom
The last one gives me the error in my first message : [FATAL tini (7)] exec /docker-entrypoint.sh failed: No such file or directory
If I understand the Dockerfile you created few months ago, it copies the docker-entrypoint.sh into the Docker image’s root folder (/). Why it couldn’t find it next ?
Sorry sadly no idea. All I know is that it works generally correct. We build an image like that every night successfully:
I did also just pull the one we build 20h ago and that one started fine for me. So there must be something different with what you are doing and the only thing I can think of right now is that maybe Windows is the problem?
I tried to build and run my custom n8n version with Linux, and it worked fine.
For other people who could have the same problem, I am going to detail my situation :
I used an xubuntu VM (lsb_relase -d = Ubuntu 18.04.5 LTS). First I cloned my Github repository, and then I build it using docker build -t n8n-custom -f docker\images\n8n-custom\Dockerfile . inside the root folder of my custom n8n version.
When I tried to run my new image, I had this error : There was an error initializing DB: "SQLITE_CANTOPEN: unable to open database file"
I just gave the rights access to docker group to the folder ~/.n8n.
Now everything is okay.
I don’t know why it’s not working on Windows, Oh Windows…
Hello, I usually don’t like to revive old posts on forums, but I think it’s worth sharing the solution that worked for me on Windows.
You just need to change and save the script “docker-entrypoint.sh” from CRLF to regular LF and it works.
Solution found at docker - entrypoint file not found - Stack Overflow