[GH-ISSUE #202] Entrypoint not found #62

Closed
opened 2026-02-27 04:58:59 +03:00 by kerem · 3 comments
Owner

Originally created by @HermanRas on GitHub (Feb 22, 2025).
Original GitHub issue: https://github.com/guyzyl/whatsapp-contact-sync/issues/202

I have no idea whats going on, from bash its refusing to execute entrypoint.sh

Image

docker run --rm -it -p 80:80 --entrypoint /bin/sh whasync

/bin/sh: ./entrypoint.sh: not found
/app/server # ls -la
total 32
drwxr-xr-x 1 root root 4096 Feb 22 05:48 .
drwxr-xr-x 1 root root 4096 Feb 22 05:30 ..
drwxr-xr-x 4 root root 4096 Feb 22 05:48 build
-rwxr-xr-x 1 root root 264 Feb 22 05:26 entrypoint.sh
drwxr-xr-x 224 root root 12288 Feb 22 05:48 node_modules
/app/server # cat entrypoint.sh
#!/bin/sh

node build/server/main.js &

#Wait for the server to start
while ! nc -z 0.0.0.0 8080; do
sleep 0.1
done

echo "Starting Nginx server"
nginx &
echo "Nginx server started, listening on port 80"

#Crash container if node failes
wait %1

/app/server # ./entrypoint.sh
/bin/sh: ./entrypoint.sh: not found
/app/server # /app/server/entrypoint.sh
/bin/sh: /app/server/entrypoint.sh: not found
/app/server #

Originally created by @HermanRas on GitHub (Feb 22, 2025). Original GitHub issue: https://github.com/guyzyl/whatsapp-contact-sync/issues/202 I have no idea whats going on, from bash its refusing to execute entrypoint.sh ![Image](https://github.com/user-attachments/assets/0a015bc8-d69a-4936-8ed5-7576af2d497e) docker run --rm -it -p 80:80 --entrypoint /bin/sh whasync --- /bin/sh: ./entrypoint.sh: not found /app/server # ls -la total 32 drwxr-xr-x 1 root root 4096 Feb 22 05:48 . drwxr-xr-x 1 root root 4096 Feb 22 05:30 .. drwxr-xr-x 4 root root 4096 Feb 22 05:48 build -rwxr-xr-x 1 root root 264 Feb 22 05:26 entrypoint.sh drwxr-xr-x 224 root root 12288 Feb 22 05:48 node_modules /app/server # cat entrypoint.sh #!/bin/sh node build/server/main.js & #Wait for the server to start while ! nc -z 0.0.0.0 8080; do sleep 0.1 done echo "Starting Nginx server" nginx & echo "Nginx server started, listening on port 80" #Crash container if node failes wait %1 /app/server # ./entrypoint.sh /bin/sh: ./entrypoint.sh: not found /app/server # /app/server/entrypoint.sh /bin/sh: /app/server/entrypoint.sh: not found /app/server #
kerem closed this issue 2026-02-27 04:58:59 +03:00
Author
Owner

@guyzyl commented on GitHub (Feb 22, 2025):

I know my answer doesn't help, but I just tested and it's working on my machine.
Since the file is there, it's probably an issue that's unrelated to this specific project.
I found this thread on StackOverflow, can you maybe try their suggestions?

<!-- gh-comment-id:2676366879 --> @guyzyl commented on GitHub (Feb 22, 2025): I know my answer doesn't help, but I just tested and it's working on my machine. Since the file is there, it's probably an issue that's unrelated to this specific project. I found this [thread on StackOverflow](https://stackoverflow.com/questions/37419042/container-command-start-sh-not-found-or-does-not-exist-entrypoint-to-contain), can you maybe try their suggestions?
Author
Owner

@HermanRas commented on GitHub (Feb 22, 2025):

You are a legend !

I updated the docker file to fix end of line characters and it worked.

Image

now runs 100%
Image

I have no idea why my stock standard Ubuntu did not read the line terminator, but the change to the fix line terminators while setting execute works.

RUN sed -i 's/\r$//' entrypoint.sh  && \  
    chmod 755 entrypoint.sh
<!-- gh-comment-id:2676396653 --> @HermanRas commented on GitHub (Feb 22, 2025): You are a legend ! I updated the docker file to fix end of line characters and it worked. ![Image](https://github.com/user-attachments/assets/bcabdfd2-0ddd-4350-8aa3-53754de526de) now runs 100% ![Image](https://github.com/user-attachments/assets/d8cd2bdb-ec22-490e-a1c1-6542e72c5867) I have no idea why my stock standard Ubuntu did not read the line terminator, but the change to the fix line terminators while setting execute works. ``` RUN sed -i 's/\r$//' entrypoint.sh && \ chmod 755 entrypoint.sh ```
Author
Owner

@guyzyl commented on GitHub (Feb 22, 2025):

Glad I could help!

<!-- gh-comment-id:2676398221 --> @guyzyl commented on GitHub (Feb 22, 2025): Glad I could help!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whatsapp-contact-sync#62
No description provided.