[GH-ISSUE #4746] [Feature Request] Docker环境下如何指定配置文件而不是ini #3748

Closed
opened 2026-05-05 14:24:05 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @gralliry on GitHub (Apr 6, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4746

Describe the feature request

Docker镜像是否可以添加一个识别或指定配置文件类型的环境变量或设置

services:
  frps:
    image: snowdreamtech/frps:latest
    container_name: frps
    hostname: frps
    restart: always
    volumes:
      - ./frps.toml:/etc/frp/frps.toml # 这里使用toml
2025/04/06 19:13:50 [I] [root.go:200] frps uses config file: /etc/frp/frps.ini
2025/04/06 19:13:51 [I] [service.go:192] frps tcp listen on 0.0.0.0:7000
2025/04/06 19:13:51 [I] [root.go:209] frps started successfully

日志中一直使用的是ini默认配置文件启动

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @gralliry on GitHub (Apr 6, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4746 ### Describe the feature request Docker镜像是否可以添加一个识别或指定配置文件类型的环境变量或设置 ```yaml services: frps: image: snowdreamtech/frps:latest container_name: frps hostname: frps restart: always volumes: - ./frps.toml:/etc/frp/frps.toml # 这里使用toml ``` ``` 2025/04/06 19:13:50 [I] [root.go:200] frps uses config file: /etc/frp/frps.ini 2025/04/06 19:13:51 [I] [service.go:192] frps tcp listen on 0.0.0.0:7000 2025/04/06 19:13:51 [I] [root.go:209] frps started successfully ``` 日志中一直使用的是ini默认配置文件启动 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@wuai1024 commented on GitHub (Apr 7, 2025):

使用 -c /etc/frp/frps.toml 指定配置文件运行。

services:
  frps:
    image: wuai1024/frps:latest
    container_name: frps
    hostname: frps
    restart: always
    volumes:
      - ./frps.toml:/etc/frp/frps.toml # 这里使用toml
    command: -c /etc/frp/frps.toml

如此即好。

<!-- gh-comment-id:2782017483 --> @wuai1024 commented on GitHub (Apr 7, 2025): 使用 `-c /etc/frp/frps.toml` 指定配置文件运行。 ```bash services: frps: image: wuai1024/frps:latest container_name: frps hostname: frps restart: always volumes: - ./frps.toml:/etc/frp/frps.toml # 这里使用toml command: -c /etc/frp/frps.toml ``` 如此即好。
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: github-starred/frp#3748
No description provided.