services: aria2bot: # 方式一:使用预构建镜像(推荐) image: dnslin/aria2bot:latest # 方式二:本地构建(取消下行注释,注释上行) # build: . container_name: aria2bot restart: unless-stopped volumes: # 下载目录 - ./downloads:/root/downloads # aria2 配置目录(包含配置文件、会话、云存储令牌) - ./config:/root/.config/aria2 env_file: - .env # 可选:暴露 aria2 RPC 端口(如需外部访问) # ports: # - "6800:6800"