2022-05-05 06:02:57 +03:00
|
|
|
# qBittorrent-nox Docker Image
|
2022-04-25 06:39:25 +03:00
|
|
|
|
2022-05-05 06:02:57 +03:00
|
|
|
This Dockerfile allows you to build a docker image containing qBittorrent-nox
|
2022-04-25 06:39:25 +03:00
|
|
|
|
2022-05-05 06:02:57 +03:00
|
|
|
## Prerequisities
|
2022-04-25 06:39:25 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
In order to build/run this image you'll need `docker` installed: https://docs.docker.com/get-docker/
|
|
|
|
|
|
|
|
It is also recommended to install `docker-compose` as it can significantly ease the process: https://docs.docker.com/compose/install/
|
2022-04-25 06:39:25 +03:00
|
|
|
|
2022-05-05 06:02:57 +03:00
|
|
|
## Building docker image
|
2022-04-25 06:39:25 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
* If you are using docker (not docker-compose) then run the following commands in this folder:
|
|
|
|
```shell
|
|
|
|
export \
|
|
|
|
QBT_VERSION=devel
|
|
|
|
docker build \
|
|
|
|
--build-arg QBT_VERSION \
|
|
|
|
-t qbittorrent-nox:"$QBT_VERSION" \
|
|
|
|
.
|
|
|
|
```
|
|
|
|
|
|
|
|
* If you are using docker-compose then you should edit `.env` file first.
|
|
|
|
You can find an explaination of the variables in the following [Parameters](#parameters) section. \
|
|
|
|
Then run the following commands in this folder:
|
|
|
|
```shell
|
|
|
|
docker compose build \
|
|
|
|
--build-arg QBT_VERSION
|
|
|
|
```
|
2022-04-25 06:39:25 +03:00
|
|
|
|
2022-05-05 06:02:57 +03:00
|
|
|
### Parameters
|
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
#### Environment variables
|
|
|
|
|
|
|
|
* `QBT_EULA` \
|
|
|
|
This environment variable defines whether you accept the end-user license agreement (EULA) of qBittorrent. \
|
|
|
|
**Put `accept` only if you understand and accepted the EULA.** You can find
|
|
|
|
the EULA [here](https://github.com/qbittorrent/qBittorrent/blob/56667e717b82c79433ecb8a5ff6cc2d7b315d773/src/app/main.cpp#L320-L323).
|
|
|
|
* `QBT_VERSION` \
|
2022-05-05 06:02:57 +03:00
|
|
|
This environment variable specifies the version of qBittorrent-nox to be built. \
|
|
|
|
For example, `4.4.0` is a valid entry. You can find all tagged versions [here](https://github.com/qbittorrent/qBittorrent/tags). \
|
|
|
|
Or you can put `devel` to build the latest development version.
|
2022-05-05 15:56:11 +03:00
|
|
|
* `QBT_WEBUI_PORT` \
|
|
|
|
This environment variable sets the port number which qBittorrent WebUI will be binded to.
|
|
|
|
|
|
|
|
#### Volumes
|
|
|
|
|
|
|
|
There are some paths involved:
|
|
|
|
* `<your_path>/config` on your host machine will contain qBittorrent configurations
|
|
|
|
* `<your_path>/downloads` on your host machine will contain the files downloaded by qBittorrent
|
2022-05-05 06:02:57 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
## Running container
|
2022-05-05 06:02:57 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
* Using docker (not docker-compose), simply run:
|
2022-05-05 06:02:57 +03:00
|
|
|
```shell
|
|
|
|
export \
|
|
|
|
QBT_EULA=accept \
|
2022-05-05 15:56:11 +03:00
|
|
|
QBT_VERSION=devel \
|
|
|
|
QBT_WEBUI_PORT=8080 \
|
|
|
|
QBT_CONFIG_PATH="/tmp/bbb/config"
|
|
|
|
QBT_DOWNLOADS_PATH="/tmp/bbb/downloads"
|
2022-05-05 06:02:57 +03:00
|
|
|
docker run \
|
2022-05-05 15:56:11 +03:00
|
|
|
-t \
|
2022-05-05 06:51:42 +03:00
|
|
|
--read-only \
|
2022-05-05 06:02:57 +03:00
|
|
|
--rm \
|
2022-05-05 14:50:05 +03:00
|
|
|
--tmpfs /tmp \
|
2022-05-05 06:02:57 +03:00
|
|
|
--name qbittorrent-nox \
|
|
|
|
-e QBT_EULA \
|
|
|
|
-e QBT_WEBUI_PORT \
|
2022-05-05 15:56:11 +03:00
|
|
|
-p "$QBT_WEBUI_PORT":"$QBT_WEBUI_PORT"/tcp \
|
2022-05-05 06:02:57 +03:00
|
|
|
-p 6881:6881/tcp \
|
|
|
|
-p 6881:6881/udp \
|
2022-05-05 15:56:11 +03:00
|
|
|
-v "$QBT_CONFIG_PATH":/config \
|
|
|
|
-v "$QBT_DOWNLOADS_PATH":/downloads \
|
2022-05-05 06:02:57 +03:00
|
|
|
qbittorrent-nox:"$QBT_VERSION"
|
|
|
|
```
|
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
* Using docker-compose:
|
2022-05-05 06:02:57 +03:00
|
|
|
```shell
|
2022-05-05 15:56:11 +03:00
|
|
|
docker compose up
|
2022-05-05 06:02:57 +03:00
|
|
|
```
|
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
Then you can login at: `http://127.0.0.1:8080`
|
2022-05-05 06:02:57 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
## Stopping container
|
2022-05-05 06:02:57 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
* Using docker (not docker-compose):
|
|
|
|
```shell
|
|
|
|
docker stop -t 1800 qbittorrent-nox
|
|
|
|
```
|
2022-05-05 06:02:57 +03:00
|
|
|
|
2022-05-05 15:56:11 +03:00
|
|
|
* Using docker-compose:
|
|
|
|
```shell
|
|
|
|
docker compose down
|
|
|
|
```
|