[GH-ISSUE #291] 使用 Docker 部署时,是否需要将 app.ini 从主机映射到容器中? #1496

Closed
opened 2026-02-27 12:11:10 +03:00 by kerem · 3 comments
Owner

Originally created by @jearton on GitHub (Feb 18, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/291

image

如图,在宿主机上的 /mnt/user/appdata/nginx-ui 目录下是否需要提前放好 app.ini 配置文件?

Originally created by @jearton on GitHub (Feb 18, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/291 ![image](https://github.com/0xJacky/nginx-ui/assets/10370433/dd8c867a-bae3-4371-9115-c4498d611973) 如图,在宿主机上的 /mnt/user/appdata/nginx-ui 目录下是否需要提前放好 app.ini 配置文件?
kerem 2026-02-27 12:11:10 +03:00
Author
Owner

@0xJacky commented on GitHub (Feb 18, 2024):

不需要,文档也没说呀

<!-- gh-comment-id:1951063467 --> @0xJacky commented on GitHub (Feb 18, 2024): 不需要,文档也没说呀
Author
Owner

@jearton commented on GitHub (Feb 18, 2024):

不需要,文档也没说呀

不对,如果没有 app.ini,会报错

docker run --rm -e TZ=Asia/Shanghai -p 80:80 -p 443:443 uozi/nginx-ui:latest

image

image

<!-- gh-comment-id:1951137016 --> @jearton commented on GitHub (Feb 18, 2024): > 不需要,文档也没说呀 不对,如果没有 app.ini,会报错 ```shell docker run --rm -e TZ=Asia/Shanghai -p 80:80 -p 443:443 uozi/nginx-ui:latest ``` ![image](https://github.com/0xJacky/nginx-ui/assets/10370433/47cfad9d-16bb-4a17-b041-920b63c38884) ![image](https://github.com/0xJacky/nginx-ui/assets/10370433/a34b45df-0e74-4c04-b2cf-4ebcb88d9ef5)
Author
Owner

@0xJacky commented on GitHub (Feb 18, 2024):

我重新确认了一下,需要映射目录或者映射数据卷,不能直接启动容器,否则 /etc/nginx-ui 目录为空,无法写入配置文件。

<!-- gh-comment-id:1951153957 --> @0xJacky commented on GitHub (Feb 18, 2024): 我重新确认了一下,需要映射目录或者映射数据卷,不能直接启动容器,否则 /etc/nginx-ui 目录为空,无法写入配置文件。
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/nginx-ui#1496
No description provided.