镜像来源:https://hub.docker.com/r/linuxserver/qbittorrent
先安装Docker,然后执行以下命令:
- docker-compose:
--- services: qbittorrent: image: lscr.io/linuxserver/qbittorrent:latest container_name: qbittorrent environment: - PUID=1000 - PGID=1000 - TZ=Asia/Shanghai - WEBUI_PORT=8080 - TORRENTING_PORT=6881 volumes: - /path/to/qbittorrent/appdata:/config - /path/to/downloads:/downloads ports: - 8080:8080 - 6881:6881 - 6881:6881/udp restart: unless-stopped
|
- docker cli:
docker run -d \ --name=qbittorrent \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Asia/Shanghai \ -e WEBUI_PORT=8080 \ -e TORRENTING_PORT=6881 \ -p 8080:8080 \ -p 6881:6881 \ -p 6881:6881/udp \ -v /opt/qbittorrent/appdata:/config \ -v /opt/qbittorrent/downloads:/downloads `#optional` \ --restart unless-stopped \ lscr.io/linuxserver/qbittorrent:latest
|
安装完成后,相关信息如下:
qbittorrent地址:http://ip:8080 用户名:admin 密码:用户的临时密码admin将在启动时打印到容器日志中 配置和/下载目录:~/qbittorrent
|
卸载命令:
ContainerID=`docker ps|grep linuxserver/qbittorrent|awk '{print $1}'` docker kill ${ContainerID} docker rm ${ContainerID} docker rmi `docker images|grep linuxserver/qbittorrent|awk '{print $3}'`
rm -rf ~/qbittorrent
|