-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker fails to execute docker-entrypoint.sh if an image was built in Windows #5620
Comments
Hey @dobromyslov, Thanks for reporting this one, It looks like a fairly quick fix. I will have a chat with the team to see if there is any possible downside to doing this. |
Hey @Joffcom I have also encountered this problem. After packaging the image on Windows and Mac, I uploaded it to my own image repository. However, I also encountered errors when running it through Potainer. I also tried to build and run the image using Drone, but encountered errors. Additionally, our own image size seems to be much smaller than the images on Docker Hub, so I'm trying to understand how you package the images. |
Hey @Joffcom |
Hey @sdghf Did you try the fix mentioned? Rather than using portainer what happens if you just use the docker run command? Have you also checked that your build is creating an image for the correct cpu type? I know if I make a custom image on my M1 Mac it won't work on my nuc because I am not building an amd64 image. I would also expect a custom image to be a lot bigger like 700mb - 1GB, can you share the exact command you are using to build the image and any changes you have made that require a custom image. |
Hey @Joffcom If running docker run locally is not an issue, but I want to deploy it to a server. I have tried to fix it, but the error still occurs. I know it's probably a CPU type issue, but I don't know how to build the correct image for the CPU type. I packaged the image using docker/images/n8n-custom. I made some simple code modifications to adapt it to our own business, so I must create a custom image. |
Hey @sdghf, Can you confirm what CPU you are building on and what CPU you are deploying on? If you are making a custom image for another CPU you would need to use something buildx to pass in the platforms but that is not something I have instructions for and you would need to do a bit of digging through the docker docs for that one. |
Hey @dobromyslov, I have just popped in a PR which should fix this once merged, Thanks for raising this one. For now I am going to mark this one as closed if you still find it is an issue let me know and we can open it again. |
Fix got released with |
Describe the bug
docker-entrypoint.sh
files are also affected by such conversion.docker-entrypoint.sh
with CRLF line endings:To Reproduce
Steps to reproduce the behavior:
git config --global core.autocrlf true
[FATAL tini (7)] exec /docker-entrypoint.sh failed: No such file or directory
.Expected behavior
I expect
.sh
files.We can achieve this with the following config in the
.gitattributes
file:Environment (please complete the following information):
Workaround
The text was updated successfully, but these errors were encountered: