AX9000使用docker实现aria2下载

打开docker管理页面
在这里插入图片描述
选择不使用qbittorrent的原因是路由器下载时负载会很高,个人感觉很卡。
所以使用aria2
使用stacks进行创建,使用host模式,省心
复制一下代码,具体指令可意思可查看p3terx/aria2-proDownload Compose fileAria2 Pro - 更好用的 Aria2 Docker 容器镜像

说明个人需修改的地方
- RPC_SECRET= xx,密码可以自定义
- IPV6_MODE=ture 打开ipv6,bt下载必备?
- UPDATE_TRACKERS=true 自动更新trackers列表,PT 下载和想手动填写设置 BT tracker 需求必须选择false,禁用
- CUSTOM_TRACKER_URL= 更新tracker列表获取地址,英文逗号隔开,我选择了常用的优秀tracker源,如果你有更好的可以自行添加。

  volumes:
  - /mnt/docker_disk/aria2-config:/config
  - /mnt/docker_disk/aria2-downloads:/downloads

这一部分是对配置文件和下载地址的配置,可以自行设置挂载,需要注意的是此docker默认必须是downloads为下载目录且不支持修改,所以选择下载地址需要谨慎

version: "3.8"

services:

  Aria2-Pro:
    container_name: aria2-pro
    image: p3terx/aria2-pro
    environment:
      - PUID=65534
      - PGID=65534
      - UMASK_SET=022
      - RPC_SECRET=123456
      - RPC_PORT=6800
      - LISTEN_PORT=6888
      - DISK_CACHE=256M
      - IPV6_MODE=ture
      - UPDATE_TRACKERS=true
      - CUSTOM_TRACKER_URL=https://cdn.staticaly.com/gh/XIU2/TrackersListCollection/master/best.txt,https://cdn.staticaly.com/gh/XIU2/TrackersListCollection/master/all.txt,https://cdn.staticaly.com/gh/XIU2/TrackersListCollection/master/http.txt,https://ngosang.github.io/trackerslist/trackers_best.txt,https://ngosang.github.io/trackerslist/trackers_all.txt,https://ngosang.github.io/trackerslist/trackers_all_udp.txt,https://ngosang.github.io/trackerslist/trackers_all_http.txt,https://ngosang.github.io/trackerslist/trackers_all_https.txt,https://ngosang.github.io/trackerslist/trackers_all_ws.txt,https://ngosang.github.io/trackerslist/trackers_all_ip.txt,https://trackerslist.com/all_aria2.txt,
      - TZ=Asia/Shanghai
    volumes:
      - /mnt/docker_disk/aria2-config:/config
      - /extdisks/sda2/aria2-downloads:/downloads

# If you use host network mode, then no port mapping is required.
# This is the easiest way to use IPv6 networks.
    network_mode: host
#    network_mode: bridge
#    ports:
#      - 6800:6800
#      - 6888:6888
#      - 6888:6888/udp
    restart: always
# Since Aria2 will continue to generate logs, limit the log size to 1M to prevent your hard disk from running out of space.
    logging:
      driver: json-file
      options:
        max-size: 1m

# AriaNg is just a static web page, usually you only need to deploy on a single host.
  AriaNg:
    container_name: ariang
    image: p3terx/ariang
    command: --port 6880 --ipv6
    network_mode: host
#    network_mode: bridge
#    ports:
#      - 6880:6880
    restart: always
    logging:
      driver: json-file
      options:
        max-size: 1m

个人体验下来还是很不错的。有什么问题请先看官方网站,大部分都可以解决。

目前遇到设置下载目录到另一个分区文件无法下载的问题,需要进入配置文件修改
file-allocation=none而不是默认的prealloc
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/wojuzi/article/details/127131159