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

"exec: \"docker-entrypoint.sh\": executable file not found in $PATH". #296

Closed
stockersky opened this issue Jun 1, 2017 · 13 comments
Closed

Comments

@stockersky
Copy link

Hello,

First of all, i do not have this error when using your repository directly.
However, as i have to change things like locales, etc... i copied the 2 files offered from this repository.
While not modifying them at all, i encounter this error while launching a container :

docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"docker-entrypoint.sh\": executable file not found in $PATH".

While testing, this comes from the line n°67 : ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]

I solved it with the help of this other issue on another project :
https://github.com/moby/moby/issues/27182

How can it be, that your code works while directly called by docker from your repo, but not when using the file locally? (I guess, many users will want to modify your files to adapt to their needs - especially locales...)

Thansk!

Guillaume

@hanks
Copy link

hanks commented Jun 15, 2017

Also hit this issue

RUN chmod 777 /usr/local/bin/docker-entrypoint.sh \
    && ln -s /usr/local/bin/docker-entrypoint.sh /

to fix it

@tianon
Copy link
Member

tianon commented Jun 15, 2017 via email

@hanks
Copy link

hanks commented Jun 15, 2017

@tianon oh, you are right. I need to delete my comment above:)

@yosifkit
Copy link
Member

Closing since no response; looks like this is just incorrect local state (@tianon's comment should solve it).

@tomerr-ma
Copy link

In my situation it was that the docker-entrypoint.sh script used "#!/bin/bash" as its shell and it doesn't exist in Docker alpine images.
I changed it to #!/bin/sh and problems resolved.

@MaicomMR
Copy link

On my case I need to run
docker-compose -d up --build
To rebuild images and download the dockerize to my images, Solved my problem

@thisismydesign
Copy link

For me the solution was ENTRYPOINT ["./entrypoint.sh"] vs ENTRYPOINT ["entrypoint.sh"].

@playitcool
Copy link

For me, it was windows-style carriage returns in the docker-entrypoint.sh script

@jsyme222
Copy link

jsyme222 commented Mar 8, 2022

This is issue plagued me for a while and I had to completely restructure my $PATH.
My docker-compose.yaml updates the environment PATH and included my local machine PATH for some reason.

Original - Path=/frontend/node_modules/.bin:$PATH
Working - Path=/frontend/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Does anyone know why it was pulling the $PATH from my local machine in the "Original" path? I thought that the variable $PATH would just be from within the container - but it included all of my local path additions at build time.

@tianon
Copy link
Member

tianon commented Mar 8, 2022

@jsyme222 all environment variable references ($FOO) in your YAML file will unfortunately be of the docker-compose environment, not the container (it would be kind of difficult/heavy for docker-compose to query that from the container image, and difficult for it to know which image to query it from based on where in the file the reference is)

What I'd suggest is doing ENV PATH /frontend/node_modules/.bin:$PATH in a short Dockerfile instead (which you can then even have docker-compose build).

In the future, these sorts of questions/requests would be more appropriately posted to a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

@giampaolo44
Copy link

[semi rant]

In the future, these sorts of questions/requests would be more appropriately posted to a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

It looks like the only reasonable suggestion, i.e. a support forum where there might be a chance, is the first.

To access the community slack you need to have an @docker or @jackmorton email. SO's record of getting answers (or even being treated respectfully) is getting so sad it's better to try and ask openAI's chatGPT.

I ended up in this thread to sort my bugs myself, after all. At least sometimes we do get hints or answers. Sorry if that clutters the issues :(

@tianon
Copy link
Member

tianon commented Jan 3, 2023

Sorry, Slack is really rubbish for fully-public discussions (not my call!) and there keep being issues with the link to join the community slack -- the latest link is https://dockr.ly/comm-slack which should allow unrestricted access.

(There's also an unofficial #docker IRC channel on https://libera.chat/ FWIW 😅)

@bacloud23

This comment was marked as off-topic.

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