Separate docker image data and config dirs

PR #16972.
This commit is contained in:
Tom Piccirello 2022-05-02 19:58:37 -07:00 committed by GitHub
parent 88a91e0769
commit a8b6a40f13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -32,6 +32,6 @@ ENV WEBUI_PORT="8080"
EXPOSE 6881 6881/udp 8080
VOLUME /config /downloads
VOLUME /config /data /downloads
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -39,10 +39,11 @@ there is one important variable to run the container:
#### Volumes
there are two main locations:
there are three main locations:
* `downloads` contains the files downloaded by qBittorrent
* `config` contains qBittorrent configurations
* `data` contains qBittorrent application data
* `downloads` contains the files downloaded by qBittorrent
```shell
docker run give.example.org/of/your/container:v0.2.1 parameters
@ -57,7 +58,7 @@ on the port `8080` the webinterface is run
To start the the docker image simply run
```shell
docker run --env LEGAL=accept -p 8080:8080 -v /your/path/config:/config -v /your/path/download:/downloads --name qBittorrent qbittorrent-nox:4.2.0
docker run --env LEGAL=accept -p 8080:8080 -v /your/path/config:/config -v /your/path/data:/data -v /your/path/download:/downloads --name qBittorrent qbittorrent-nox:4.2.0
```
to stop the container

View file

@ -18,4 +18,4 @@ else
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' /config/qBittorrent/qBittorrent.conf
fi
HOME="/config" XDG_CONFIG_HOME="/config" XDG_DATA_HOME="/config" qbittorrent-nox --webui-port=$WEBUI_PORT
HOME="/config" XDG_CONFIG_HOME="/config" XDG_DATA_HOME="/data" qbittorrent-nox --webui-port=$WEBUI_PORT