commit
962a61ed25
7 changed files with 31 additions and 9 deletions
|
|
@ -6,16 +6,14 @@ RUN apk add --no-cache \
|
||||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||||
qbittorrent-nox=${VERSION}
|
qbittorrent-nox=${VERSION}
|
||||||
|
|
||||||
ADD --chown=1000:100 qBittorrent.conf /qBittorrent/config/
|
ADD --chown=1000:100 root /
|
||||||
|
|
||||||
RUN chmod -R g+w /qBittorrent
|
|
||||||
|
|
||||||
EXPOSE 6881 6881/udp 8080
|
EXPOSE 6881 6881/udp 8080
|
||||||
|
|
||||||
ENV QBT_WEBUI_PORT=8080
|
ENV QBT_WEBUI_PORT=8080
|
||||||
|
|
||||||
VOLUME [ "/downloads" ]
|
VOLUME [ "/config", "/downloads" ]
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/qbittorrent-nox" ]
|
ENTRYPOINT [ "/run.sh" ]
|
||||||
|
|
||||||
CMD [ "--profile=/" ]
|
CMD [ "--profile=/" ]
|
||||||
|
|
|
||||||
20
README.md
20
README.md
|
|
@ -4,12 +4,17 @@
|
||||||
|
|
||||||
Docker image for qBittorrent.
|
Docker image for qBittorrent.
|
||||||
|
|
||||||
|
- Tiny size
|
||||||
|
- Enable rootless[^1]
|
||||||
|
- Enable `QBT_*` options[^2]
|
||||||
|
- Keep updating
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Pull this image:
|
Pull this image:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker pull ghcr.io/mogeko/qbittorrent:edge
|
docker pull ghcr.io/mogeko/qbittorrent
|
||||||
```
|
```
|
||||||
|
|
||||||
Run with docker cli:
|
Run with docker cli:
|
||||||
|
|
@ -17,10 +22,12 @@ Run with docker cli:
|
||||||
```shell
|
```shell
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name qbittorrent \
|
--name qbittorrent \
|
||||||
|
--user 1000:100 `#optional` \
|
||||||
-e QBT_WEBUI_PORT=8080 \
|
-e QBT_WEBUI_PORT=8080 \
|
||||||
-p 6881:6881 \
|
-p 6881:6881 \
|
||||||
-p 6881:6881/udp \
|
-p 6881:6881/udp \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
|
-v /path/to/config:/config \
|
||||||
-v /path/to/downloads:/downloads \
|
-v /path/to/downloads:/downloads \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
ghcr.io/mogeko/qbittorrent
|
ghcr.io/mogeko/qbittorrent
|
||||||
|
|
@ -35,9 +42,11 @@ services:
|
||||||
qbittorrent:
|
qbittorrent:
|
||||||
image: ghcr.io/mogeko/qbittorrent
|
image: ghcr.io/mogeko/qbittorrent
|
||||||
container_name: qbittorrent
|
container_name: qbittorrent
|
||||||
|
user: 1000:100 #optional
|
||||||
environment:
|
environment:
|
||||||
- QBT_WEBUI_PORT=8080
|
- QBT_WEBUI_PORT=8080
|
||||||
volumes:
|
volumes:
|
||||||
|
- /path/to/config:/config
|
||||||
- /path/to/downloads:/downloads
|
- /path/to/downloads:/downloads
|
||||||
ports:
|
ports:
|
||||||
- 6881:6881
|
- 6881:6881
|
||||||
|
|
@ -56,14 +65,15 @@ Container images are configured using parameters passed at runtime (such as thos
|
||||||
| `-p 6881/udp` | udp connection port |
|
| `-p 6881/udp` | udp connection port |
|
||||||
| `-p 8080` | The Web UI port |
|
| `-p 8080` | The Web UI port |
|
||||||
| `-e QBT_WEBUI_PORT=8080` | Change the Web UI port |
|
| `-e QBT_WEBUI_PORT=8080` | Change the Web UI port |
|
||||||
|
| `-v /config` | Save the configuration files |
|
||||||
| `-v /downloads` | Location of downloads on disk |
|
| `-v /downloads` | Location of downloads on disk |
|
||||||
|
|
||||||
The `qbittorrent-nox`'s options may be supplied via environment variables[^1]. For option named 'parameter-name', environment variable name is `QBT_PARAMETER_NAME` (in uppercase, `-` replaced with `_`). To pass flag values, set the variable to `1` or `TRUE`. Here is an example we already in used: `-e QBT_WEBUI_PORT=8080`.
|
The `qbittorrent-nox`'s options may be supplied via environment variables[^2]. For option named 'parameter-name', environment variable name is `QBT_PARAMETER_NAME` (in uppercase, `-` replaced with `_`). To pass flag values, set the variable to `1` or `TRUE`. Here is an example we already in used: `-e QBT_WEBUI_PORT=8080`.
|
||||||
|
|
||||||
More help message about `qbittorrent-nox`, you can get via:
|
More help message about `qbittorrent-nox`, you can get via:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run -it ghcr.io/mogeko/qbittorrent:edge --help
|
docker run -it ghcr.io/mogeko/qbittorrent --help
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
@ -73,7 +83,8 @@ The code in this project is released under the [GPL-3.0 License][license].
|
||||||
|
|
||||||
<!-- footnote -->
|
<!-- footnote -->
|
||||||
|
|
||||||
[^1]: The option `QBT_PROFILE` does not support.
|
[^1]: This image should be able to work with [podman], but it has not been tested.
|
||||||
|
[^2]: The option `QBT_PROFILE` does not support.
|
||||||
|
|
||||||
<!-- badge -->
|
<!-- badge -->
|
||||||
|
|
||||||
|
|
@ -84,3 +95,4 @@ The code in this project is released under the [GPL-3.0 License][license].
|
||||||
|
|
||||||
[docker-compose]: https://docs.docker.com/compose
|
[docker-compose]: https://docs.docker.com/compose
|
||||||
[license]: https://github.com/mogeko/docker-qbittorrent/blob/master/LICENSE
|
[license]: https://github.com/mogeko/docker-qbittorrent/blob/master/LICENSE
|
||||||
|
[podman]: https://podman.io
|
||||||
|
|
|
||||||
0
root/config/.gitkeep
Normal file
0
root/config/.gitkeep
Normal file
0
root/downloads/.gitkeep
Normal file
0
root/downloads/.gitkeep
Normal file
1
root/qBittorrent/config
Symbolic link
1
root/qBittorrent/config
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../config
|
||||||
11
root/run.sh
Executable file
11
root/run.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
_command=/usr/bin/qbittorrent-nox
|
||||||
|
_config_file=/config/qBittorrent.conf
|
||||||
|
_config_example=/default/qBittorrent.conf
|
||||||
|
|
||||||
|
if [ ! -f "${_config_file}" ]; then
|
||||||
|
install -p -m 664 "${_config_example}" "${_config_file}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "${_command}" "$@"
|
||||||
Loading…
Add table
Reference in a new issue