The nginx container never starts with the message 'sh: /docker-entrypoint.sh: not found'. #7646

Closed
opened 2026-02-21 18:21:38 -05:00 by yindo · 3 comments
Owner

Originally created by @YunosukeY on GitHub (Jan 10, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Clone the latest code (commit hash: 989fb11fd7).
  2. Try starting Dify using the "Quick Start" section in the README.

✔️ Expected Behavior

All containers start up.

Actual Behavior

The nginx container never starts with the message 'sh: /docker-entrypoint.sh: not found'.

If I change docker/nginx/docker-entrypoint.sh as follows, it starts successfully:

-#!/bin/bash
+#!/bin/sh
Originally created by @YunosukeY on GitHub (Jan 10, 2025). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Clone the latest code (commit hash: 989fb11fd715a96576333207189a12d8594c60f1). 2. Try starting Dify using the "Quick Start" section in the README. ### ✔️ Expected Behavior All containers start up. ### ❌ Actual Behavior The nginx container never starts with the message 'sh: /docker-entrypoint.sh: not found'. If I change `docker/nginx/docker-entrypoint.sh` as follows, it starts successfully: ```diff -#!/bin/bash +#!/bin/sh ```
yindo added the 🐞 bug label 2026-02-21 18:21:38 -05:00
yindo closed this issue 2026-02-21 18:21:38 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 10, 2025):

Hey @YunosukeY! 👋 I'm here to help you with any bugs, questions, or contributions you have regarding Dify. I'm a bot designed to assist you while waiting for a human maintainer. Let's squash those bugs together!

The issue you're encountering with the nginx container not starting due to the message 'sh: /docker-entrypoint.sh: not found' is likely related to the shell interpreter specified in the docker-entrypoint.sh script. The default shell used in the base image for the nginx container in the Dify setup is sh, not bash [1].

Changing the shebang line from #!/bin/bash to #!/bin/sh in the docker/nginx/docker-entrypoint.sh script, as you've done, is a valid solution to ensure compatibility with the default shell in the container. This change should resolve the issue and allow the nginx container to start successfully.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 10, 2025): <!-- Greeting --> Hey @YunosukeY! 👋 I'm here to help you with any bugs, questions, or contributions you have regarding Dify. I'm a bot designed to assist you while waiting for a human maintainer. Let's squash those bugs together! <!-- Answer --> The issue you're encountering with the nginx container not starting due to the message 'sh: /docker-entrypoint.sh: not found' is likely related to the shell interpreter specified in the `docker-entrypoint.sh` script. The default shell used in the base image for the nginx container in the Dify setup is `sh`, not `bash` <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker/docker-compose-template.yaml)</sup>. Changing the shebang line from `#!/bin/bash` to `#!/bin/sh` in the `docker/nginx/docker-entrypoint.sh` script, as you've done, is a valid solution to ensure compatibility with the default shell in the container. This change should resolve the issue and allow the nginx container to start successfully. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/44dc25f4-c8d2-46f7-9a1d-119ad3bd5855?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/44dc25f4-c8d2-46f7-9a1d-119ad3bd5855?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/44dc25f4-c8d2-46f7-9a1d-119ad3bd5855?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/44dc25f4-c8d2-46f7-9a1d-119ad3bd5855?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/44dc25f4-c8d2-46f7-9a1d-119ad3bd5855?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/44dc25f4-c8d2-46f7-9a1d-119ad3bd5855?feedback_type=other)</sup>
Author
Owner

@YunosukeY commented on GitHub (Jan 10, 2025):

I have confirmed the following:

  • The same issue occurs even with the latest deploy/dev branch (3a28e33da84893d79af731fdd612ca349b946710).
  • Similarly, the issue can be resolved by modifying the docker/nginx/docker-entrypoint.sh.
@YunosukeY commented on GitHub (Jan 10, 2025): I have confirmed the following: - The same issue occurs even with the latest deploy/dev branch (3a28e33da84893d79af731fdd612ca349b946710). - Similarly, the issue can be resolved by modifying the `docker/nginx/docker-entrypoint.sh`.
Author
Owner

@YunosukeY commented on GitHub (Jan 10, 2025):

My local nginx image was incorrect.
I re-pulled the correct image and the problem did not reproduce

@YunosukeY commented on GitHub (Jan 10, 2025): My local nginx image was incorrect. I re-pulled the correct image and the problem did not reproduce
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7646