Skip to content
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

Can't start up WP container due to entrypoint.sh error #37

Closed
daniel-dan1 opened this issue Nov 4, 2022 · 4 comments
Closed

Can't start up WP container due to entrypoint.sh error #37

daniel-dan1 opened this issue Nov 4, 2022 · 4 comments

Comments

@daniel-dan1
Copy link

Hello! I have runned previous versions of this image without issues, but since the last update to WP v6.1 I am getting an error that drops the WP container a second after it starts.
Error in the log reads:
exec /usr/local/bin/entrypoint.sh: no such file or directory

Building without the ENTRYPOINT line solves the startup issue, however we don't get that script executed. The files get copied correctly and has +x access mode.

I am running Docker Desktop v 4.12.0 in Windows 11.

@daniel-dan1
Copy link
Author

Found the issue. Seems the .sh scripts were edited in Windows on this commit and contained the CRLF end of line. I changed it to LF (what linux expects) with Notepad++ and they started working correctly.

Just in case, I attach both .sh corrected scripts. I'll also try to contribute them through my fork.

Thanks!
sh.zip

@TrafeX
Copy link
Owner

TrafeX commented Nov 5, 2022

Hi @daniel-dan1,

That's a strange issue. But I'm sure all the files in this repo use LF line endings. You can see that;

$ git ls-files --eol
..
i/lf    w/lf    attr/                 	entrypoint.sh

I think something else is causing this. Can you show the exact command you're using to run this container?

@daniel-dan1
Copy link
Author

Hi @TrafeX,

You are right. The problem was on my side. My Windows box was using the default git config, so it was converting all eol's from LF to CRLF when cloning/pulling from GitHub.
I configured core.autocrlf=false, did a clean clone, and all files are now end in LF, including the entrypoint script.

git ls-files --eol .. i/lf w/lf attr/ entrypoint.sh

Thanks for your reply and good job with this repo!
Dan.

@TrafeX
Copy link
Owner

TrafeX commented Nov 5, 2022

Good to hear you could solve it! 👍

@TrafeX TrafeX closed this as completed Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants