docker failed to run dify #8317

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

Originally created by @Mrhy1996 on GitHub (Feb 17, 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

branch main

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When i run dify by docker
cd dify cd docker cp .env.example .env docker compose up -d

Image

✔️ Expected Behavior

No response

Actual Behavior

unexpected character "%" in variable name near "%H:%M:%S\n# Log Timezone\nLOG_TZ=UTC\n\n# Debug mode, default is false.\n# It is recommended to turn on this configuration for local development\n# to prevent some problems caused by monkey patch.\nDEBUG=false\n\n# Flask debug mode, it can output trace information at the interface when turned on,\n# which is convenient for debugging.\nFLASK_DEBUG=false\n\n# A secretkey that is used for securely signing the session cookie\n# and encrypting sensitive information on the database.\n# You can generate a strong key using `openssl rand -base64 4 ........

Originally created by @Mrhy1996 on GitHub (Feb 17, 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 branch main ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce **When i run dify by docker** `` cd dify cd docker cp .env.example .env docker compose up -d `` ![Image](https://github.com/user-attachments/assets/7c4ea78f-80e3-4801-b5fb-ef73a471f36b) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior unexpected character "%" in variable name near "%H:%M:%S\n# Log Timezone\nLOG_TZ=UTC\n\n# Debug mode, default is false.\n# It is recommended to turn on this configuration for local development\n# to prevent some problems caused by monkey patch.\nDEBUG=false\n\n# Flask debug mode, it can output trace information at the interface when turned on,\n# which is convenient for debugging.\nFLASK_DEBUG=false\n\n# A secretkey that is used for securely signing the session cookie\n# and encrypting sensitive information on the database.\n# You can generate a strong key using `openssl rand -base64 4 ........
yindo closed this issue 2026-02-21 18:25:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 17, 2025):

Hey @Mrhy1996! I'm here to help you with any bugs, questions, or contribution guidance you might need. Let's figure out the issue you're facing together.

To resolve the error "unexpected character '%' in variable name" when running Dify with Docker, you need to remove or comment out the following lines from your .env file:

LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S
NGINX_SSL_PROTOCOLS=TLSv1.1 TLSv1.2 TLSv1.3

This issue occurs with Docker Compose version 2.0.1 due to its inability to properly parse environment variables containing '%' characters.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Feb 17, 2025): <!-- Greeting --> Hey @Mrhy1996! I'm here to help you with any bugs, questions, or contribution guidance you might need. Let's figure out the issue you're facing together. <!-- Answer --> To resolve the error "unexpected character '%' in variable name" when running Dify with Docker, you need to remove or comment out the following lines from your `.env` file: ```plaintext LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S NGINX_SSL_PROTOCOLS=TLSv1.1 TLSv1.2 TLSv1.3 ``` This issue occurs with Docker Compose version 2.0.1 due to its inability to properly parse environment variables containing '%' characters. <!-- 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/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4f27ce87-116b-4a7e-8a79-5484fe58a012?feedback_type=other)</sup>
Author
Owner

@Mrhy1996 commented on GitHub (Feb 17, 2025):

@dosu Thank you. Through your response, I was able to resolve my issue.

@Mrhy1996 commented on GitHub (Feb 17, 2025): @dosu Thank you. Through your response, I was able to resolve my issue.
Author
Owner

@dosubot[bot] commented on GitHub (Feb 17, 2025):

You're welcome! I'm glad to hear that the issue is resolved. If you have any more questions or need further assistance, feel free to reach out. Happy coding!

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Feb 17, 2025): <!-- Answer --> You're welcome! I'm glad to hear that the issue is resolved. If you have any more questions or need further assistance, feel free to reach out. Happy coding! <!-- 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/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/332a6708-91be-44d7-b475-66d0fb0d663e?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8317