Failed to start the nginx of docker compose under mac #1965

Closed
opened 2026-02-21 17:40:01 -05:00 by yindo · 0 comments
Owner

Originally created by @richzw on GitHub (Apr 9, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.3.12

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Mac OS: Darwin Kernel Version 21.2.0
Docker version: Docker version 25.0.2

✔️ Expected Behavior

All the related components could start successfully

Actual Behavior

The nginx failed to start with the error Error response from daemon: failed to create a task for the container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/Users/xx/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /Users/xx/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type


After checking the status of /Users/xx/dify/nginx/nginx.conf, we notice it is one folder, however, the type of /etc/nginx/nginx.conf is one file.

After comment this line #- ./nginx/nginx.conf:/etc/nginx/nginx.conf, the nginx could be started successfully.

Originally created by @richzw on GitHub (Apr 9, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a quesion, 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] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.3.12 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce - Download docker compose yaml file from https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml - Run the command `docker compose up -d` Mac OS: Darwin Kernel Version 21.2.0 Docker version: Docker version 25.0.2 ### ✔️ Expected Behavior All the related components could start successfully ### ❌ Actual Behavior The nginx failed to start with the error `Error response from daemon: failed to create a task for the container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/Users/xx/dify/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /Users/xx/dify/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type` ---- After checking the status of `/Users/xx/dify/nginx/nginx.conf`, we notice it is one folder, however, the type of `/etc/nginx/nginx.conf` is one file. After comment this line `#- ./nginx/nginx.conf:/etc/nginx/nginx.conf`, the nginx could be started successfully.
yindo added the 🐞 bug label 2026-02-21 17:40:01 -05:00
yindo closed this issue 2026-02-21 17:40:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1965