qBittorrent Docker 项目教程
docker-qbittorrent项目地址:https://gitcode.com/gh_mirrors/do/docker-qbittorrent
1. 项目的目录结构及介绍
qBittorrent Docker 项目的目录结构主要包括以下几个部分:
- 根目录: 包含项目的 Dockerfile 和一些配置文件。
- config 目录: 用于存放 qBittorrent 的配置文件。
- downloads 目录: 用于存放下载的文件。
具体目录结构如下:
docker-qbittorrent/
├── Dockerfile
├── config/
│ └── qBittorrent.conf
└── downloads/
根目录
- Dockerfile: 定义了如何构建 Docker 镜像。
config 目录
- qBittorrent.conf: qBittorrent 的主要配置文件,包含各种设置选项,如用户身份、时区、端口等。
downloads 目录
- downloads: 用于存放通过 qBittorrent 下载的文件。
2. 项目的启动文件介绍
项目的启动主要依赖于 docker-compose.yml
文件或 Docker CLI 命令。以下是 docker-compose.yml
文件的示例:
version: "2"
services:
qbittorrent:
image: linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Shanghai
- UMASK_SET=022
- WEBUI_PORT=8081
volumes:
- /config:/config
- /downloads:/downloads
ports:
- 8081:8081
restart: unless-stopped
关键配置项
- image: 指定使用的 Docker 镜像。
- container_name: 容器的名称。
- environment: 环境变量,如用户 ID、组 ID、时区等。
- volumes: 挂载的卷,包括配置文件目录和下载文件目录。
- ports: 映射的端口。
- restart: 重启策略。
3. 项目的配置文件介绍
qBittorrent 的配置文件主要位于 config
目录下的 qBittorrent.conf
文件中。以下是一些关键配置项的介绍:
[Preferences]
# 用户界面设置
WebUI\Port=8081
WebUI\Address=0.0.0.0
# 下载设置
Downloads\SavePath=/downloads
# 网络设置
Connection\PortRangeMin=6881
Connection\PortRangeMax=6881
关键配置项
- WebUI\Port: Web 界面的端口。
- WebUI\Address: Web 界面的绑定地址。
- Downloads\SavePath: 下载文件的保存路径。
- Connection\PortRangeMin 和 Connection\PortRangeMax: 连接的端口范围。
通过这些配置项,可以自定义 qBittorrent 的行为和网络设置。
以上是 qBittorrent Docker 项目的目录结构、启动文件和配置文件的介绍。希望这份文档能帮助你更好地理解和使用该项目。
docker-qbittorrent项目地址:https://gitcode.com/gh_mirrors/do/docker-qbittorrent