Sign inSign up

anyshpm/aria2

By anyshpm

•Updated 8 months ago

Image
0

787

anyshpm/aria2 repository overview

⁠Aria2 Docker Image

Docker Pulls Docker Stars CI Docker Image Size

这是一个轻量级的 Aria2 Docker 镜像,基于 Alpine Linux 构建,支持多平台架构。

A lightweight Aria2 Docker image based on Alpine Linux with multi-architecture support.

⁠特性 / Features

  • 🐳 轻量级镜像 - 基于 Alpine Linux 3.19,镜像体积小

  • 🌐 多架构支持 - 同时支持 AMD64 和 ARM64 架构

  • ⚡ 快速下载 - 集成 Aria2 高性能下载工具

  • 🔐 安全签名 - 镜像经过 Cosign 签名验证

  • 🚀 持续集成 - GitHub Actions 自动构建和发布

  • 🐳 Lightweight - Based on Alpine Linux 3.19 with small image size

  • 🌐 Multi-architecture - Supports both AMD64 and ARM64

  • ⚡ Fast Download - Integrated high-performance Aria2 download tool

  • 🔐 Signed Images - Images are signed with Cosign

  • 🚀 CI/CD - Automated build and release via GitHub Actions

⁠镜像信息 / Image Information

镜像标签架构大小说明
latestamd64, arm64~10MB最新稳定版本
v1.37.0amd64, arm64~10MB指定版本
mainamd64, arm64~10MB开发分支版本
TagArchitectureSizeDescription
latestamd64, arm64~10MBLatest stable version
v1.37.0amd64, arm64~10MBSpecific version
mainamd64, arm64~10MBDevelopment branch

⁠快速开始 / Quick Start

⁠拉取镜像 / Pull Image
docker pull anyshpm/aria2:latest
⁠基本用法 / Basic Usage
# 直接下载单个文件 / Download a single file
docker run --rm anyshpm/aria2 https://example.com/file.zip

# 下载 BT 种子 / Download BT torrent
docker run --rm anyshpm/aria2 https://example.com/file.torrent

# 下载磁力链接 / Download magnet link
docker run --rm anyshpm/aria2 'magnet:?xt=urn:btih:...'
⁠高级用法 / Advanced Usage
⁠持久化下载目录 / Persistent Download Directory
# 创建下载目录 / Create download directory
mkdir -p ~/downloads

# 使用 volume 挂载 / Mount volume
docker run --rm \
  -v ~/downloads:/downloads \
  anyshpm/aria2 \
  -d /downloads \
  https://example.com/file.zip
⁠使用自定义配置文件 / Using Custom Configuration
# 创建配置文件 / Create config file
cat > aria2.conf <<EOF
dir=/downloads
max-connection-per-server=16
split=8
EOF

# 使用配置文件运行 / Run with config
docker run --rm \
  -v ~/downloads:/downloads \
  -v $(pwd)/aria2.conf:/aria2.conf:ro \
  anyshpm/aria2 \
  --conf-path=/aria2.conf
⁠RPC 服务器模式 / RPC Server Mode
docker run -d \
  --name aria2 \
  -p 6800:6800 \
  -v ~/downloads:/downloads \
  anyshpm/aria2 \
  --enable-rpc \
  --rpc-listen-all=true \
  --dir=/downloads
⁠多线程下载 / Multi-thread Download
docker run --rm anyshpm/aria2 \
  -x 16 \
  -s 8 \
  -k 1M \
  https://example.com/largefile.iso

⁠参数说明 / Parameters

参数说明默认值
-d, --dir下载目录当前目录
-x, --max-connection-per-server单服务器最大连接数1
-s, --split文件分段数1
-k, --min-split-size最小分段大小20M
--enable-rpc启用 RPC 接口false
--rpc-listen-all监听所有网络接口false
ParameterDescriptionDefault
-d, --dirDownload directoryCurrent directory
-x, --max-connection-per-serverMax connections per server1
-s, --splitNumber of file splits1
-k, --min-split-sizeMinimum split size20M
--enable-rpcEnable RPC interfacefalse
--rpc-listen-allListen on all interfacesfalse

⁠Docker Compose 示例 / Docker Compose Example

version: '3.8'

services:
  aria2:
    image: anyshpm/aria2:latest
    container_name: aria2
    ports:
      - "6800:6800"
    volumes:
      - ./downloads:/downloads
      - ./aria2.conf:/aria2.conf:ro
    command: >
      --conf-path=/aria2.conf
      --enable-rpc
      --rpc-listen-all=true
    restart: unless-stopped

使用方法 / Usage:

# 启动服务 / Start service
docker-compose up -d

# 查看日志 / View logs
docker-compose logs -f aria2

# 停止服务 / Stop service
docker-compose down

⁠构建 / Build

⁠从源码构建 / Build from Source
# 克隆仓库 / Clone repository
git clone https://github.com/anyshpm/docker-aria2.git
cd docker-aria2

# 构建镜像 / Build image
docker build -t my-aria2 .

# 指定版本构建 / Build with specific version
docker build \
  --build-arg ARIA2_VERSION=1.37.0-r0 \
  -t my-aria2:1.37.0 .
⁠多架构构建 / Multi-architecture Build
# 使用 buildx 构建多架构镜像 / Use buildx for multi-arch
docker buildx create --use
docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t my-aria2:latest \
  --push .

⁠环境变量 / Environment Variables

变量说明默认值
ARIA2_VERSIONAria2 版本1.37.0-r0
PLATFORM目标平台arm
VariableDescriptionDefault
ARIA2_VERSIONAria2 version1.37.0-r0
PLATFORMTarget platformarm

⁠常见问题 / FAQ

⁠Q: 如何验证镜像签名?/ How to verify image signature?
# 安装 cosign / Install cosign
curl -L https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 -o cosign
chmod +x cosign

# 验证镜像 / Verify image
./cosign verify anyshpm/aria2:latest
⁠Q: 如何限制下载速度?/ How to limit download speed?
docker run --rm anyshpm/aria2 \
  --max-download-limit=1M \
  https://example.com/file.zip
⁠Q: 如何断点续传?/ How to resume interrupted download?
# 使用 -c 参数 / Use -c parameter
docker run --rm anyshpm/aria2 -c https://example.com/file.zip

⁠版本 / Versions

  • Aria2 Version: 1.37.0-r0
  • Alpine Version: 3.19

查看所有可用标签 / View all available tags:

docker pull anyshpm/aria2

⁠许可证 / License

本项目采用与 Aria2 相同的许可证 / This project follows the same license as Aria2.

⁠贡献 / Contributing

欢迎提交 Issue 和 Pull Request!/ Issues and Pull Requests are welcome!

⁠作者 / Author

Anyshpm Chen - [email protected]⁠


注意 / Note: 本镜像仅提供 Aria2 二进制文件,如需 Web UI 或 RPC 管理界面,请配合其他工具使用。/ This image only provides the Aria2 binary. For Web UI or RPC management interfaces, please use with other tools.

Tag summary

Content type

Image

Digest

sha256:aabbe0c51…

Size

8.9 MB

Last updated

almost 2 years ago

docker pull anyshpm/aria2