Docker run error

Hey guys, Hope you’re doing great.

I have a problem with running a docker container.
First I ran the docker build command from my local Dockerfile:
docker build --build-arg N8N_VERSION=0.18.1 -t n8nio/n8n:0.18.1 .

Then I ran the docker run command:
docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n:0.18.1

But I faced this error:
[FATAL tini (7)] exec / failed: No such file or directory

But there is a file in /docker/images/n8n directory!
Any idea what’s wrong with this?

Thanks alot.

Not sure I understand. Why do you build the image yourself and do not use the published version? And why do you then build a version with the code from probably over a year ago?

Dear @jan, I made some changes on it, I want to run it by docker. That’s why I’m not using the published version.

I looked at the readme file, (/docker/images/n8n/readme) it says:

Build Docker-Image

docker build --build-arg N8N_VERSION=<VERSION> -t n8nio/n8n:<VERSION> .

# For example:
docker build --build-arg N8N_VERSION=0.18.1 -t n8nio/n8n:0.18.1 .

I just used the example command. The numbers doesn’t really matter right? Because it meant to build the Dockerfile of the project.

The number is literally the only thing that matters. It does not use any of the code in the project at all. All it does is to npm install the n8n version with that number you provide there.

If you want to do a real custom build with your local code, you have to use the n8n-custom docker file here:

1 Like

Thank you very very much @jan.
OK I look at that.
Have a nice day.

You are welcome! You too & Have fun!

1 Like

Dear @jan
I ran the build command exactly same as the n8n-custom readme file.

Execute the following in the n8n root folder:

docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile .

All command went fine, but when comes to here:
RUN lerna bootstrap --hoist – --production
after a few minutes it raises this error:

#21 574.0 npm ERR! code EINTEGRITY
#21 574.0 npm ERR! sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== integrity checksum failed when using sha512: wanted sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== but got sha512-HKgmm3PfMO7EvMH2Pv+O61qOeifAI8AyE63lng9HWYvAZlvKWSrIpI3RQhl28oyuwFBA3TdPcjfKEAWNXhtHHA==. (3901900 bytes)
#21 574.0
#21 574.0 npm ERR! A complete log of this run can be found in:
#21 574.0 npm ERR! /root/.npm/_logs/2021-02-04T11_50_06_348Z-debug.log
#21 574.0
#21 574.0 lerna ERR! npm install --production exited 1 in ‘n8n’

executor failed running [/bin/sh -c lerna bootstrap --hoist – --production]: exit code: 1

Do you have any idea?

Looks like maybe something went wrong downloading a package as apparently, the checksums do not match. So maybe simply retry?

Generally did the last nightly build (which creates a docker-image of the current master every night) from 11h ago work fine:

Thanks for the answer. Tried multiple times still same problem. Let me pull the changes and try again.

Hi again.
My project had some ts errors, i fixed all via tslintfix command, also I checked for the errors by tslint command and it seems there isn’t any.
But when it comes to “npm run build” it raises some errors. The errors mostly relate to missing comma and indentation and it also ignores tslint disable lines! What are these? And is there any automatic command like tslintfix to fix them all? I can manually fix them except the tslint disable ones! It’s very weird!

Btw… Have a nice weekend.

Honestly no idea what is going wrong. But sounds like something got messed up. There are currently no issues on the master. You can see that here:

All the latest commits have a green checkmark and not a red cross.

Also should npm run tslintfix fix all the tslint issues that can be fixed (not the case for all but missing commas are one of the ones that can be fixed automatically).

I advice to check out again from master and build from there and see if it works. Then apply your changes again and see when and what breaks it.

1 Like

Thank you very much @jan for the answer. I did exactly what you said and all error are fixed now and all codes are up to date. So I ran docker build on /n8n-custom directory and docker built an image successfully.
But the problem is: when I run it by the docker run command it throws this error:
[FATAL tini (7)] exec / failed: No such file or directory

This file does exist in n8n-custom directory, not sure why this happens! Do you have any idea?

Thanks :slight_smile: