这是一个轻量级的 Aria2 Docker 镜像,基于 Alpine Linux 构建,支持多平台架构。
A lightweight Aria2 Docker image based on Alpine Linux with multi-architecture support.
🐳 轻量级镜像 - 基于 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
| 镜像标签 | 架构 | 大小 | 说明 |
|---|---|---|---|
latest | amd64, arm64 | ~10MB | 最新稳定版本 |
v1.37.0 | amd64, arm64 | ~10MB | 指定版本 |
main | amd64, arm64 | ~10MB | 开发分支版本 |
| Tag | Architecture | Size | Description |
|---|---|---|---|
latest | amd64, arm64 | ~10MB | Latest stable version |
v1.37.0 | amd64, arm64 | ~10MB | Specific version |
main | amd64, arm64 | ~10MB | Development branch |
docker pull anyshpm/aria2:latest
# 直接下载单个文件 / 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:...'
# 创建下载目录 / Create download directory
mkdir -p ~/downloads
# 使用 volume 挂载 / Mount volume
docker run --rm \
-v ~/downloads:/downloads \
anyshpm/aria2 \
-d /downloads \
https://example.com/file.zip
# 创建配置文件 / 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
docker run -d \
--name aria2 \
-p 6800:6800 \
-v ~/downloads:/downloads \
anyshpm/aria2 \
--enable-rpc \
--rpc-listen-all=true \
--dir=/downloads
docker run --rm anyshpm/aria2 \
-x 16 \
-s 8 \
-k 1M \
https://example.com/largefile.iso
| 参数 | 说明 | 默认值 |
|---|---|---|
-d, --dir | 下载目录 | 当前目录 |
-x, --max-connection-per-server | 单服务器最大连接数 | 1 |
-s, --split | 文件分段数 | 1 |
-k, --min-split-size | 最小分段大小 | 20M |
--enable-rpc | 启用 RPC 接口 | false |
--rpc-listen-all | 监听所有网络接口 | false |
| Parameter | Description | Default |
|---|---|---|
-d, --dir | Download directory | Current directory |
-x, --max-connection-per-server | Max connections per server | 1 |
-s, --split | Number of file splits | 1 |
-k, --min-split-size | Minimum split size | 20M |
--enable-rpc | Enable RPC interface | false |
--rpc-listen-all | Listen on all interfaces | false |
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
# 克隆仓库 / 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 .
# 使用 buildx 构建多架构镜像 / Use buildx for multi-arch
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t my-aria2:latest \
--push .
| 变量 | 说明 | 默认值 |
|---|---|---|
ARIA2_VERSION | Aria2 版本 | 1.37.0-r0 |
PLATFORM | 目标平台 | arm |
| Variable | Description | Default |
|---|---|---|
ARIA2_VERSION | Aria2 version | 1.37.0-r0 |
PLATFORM | Target platform | arm |
# 安装 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
docker run --rm anyshpm/aria2 \
--max-download-limit=1M \
https://example.com/file.zip
# 使用 -c 参数 / Use -c parameter
docker run --rm anyshpm/aria2 -c https://example.com/file.zip
查看所有可用标签 / View all available tags:
docker pull anyshpm/aria2
本项目采用与 Aria2 相同的许可证 / This project follows the same license as Aria2.
欢迎提交 Issue 和 Pull Request!/ Issues and Pull Requests are welcome!
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.
Content type
Image
Digest
sha256:aabbe0c51…
Size
8.9 MB
Last updated
almost 2 years ago
docker pull anyshpm/aria2