jason b07c6ffc08
aria2 / release-aria2 (push) Failing after 1m48s
🐛 Fix entrypoint hang and lost-interpreter bugs 🐛
- rootfs/usr/local/bin/entrypoint.sh:
  1. The "start all services" gate
     (`if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]`) always evaluated
     true on a first-run container regardless of $1, because
     START_SERVICES is force-set to "yes" whenever no PID file exists yet.
     Any command passed to `docker run` — `exec ...`, `sh -c ...`,
     `shell`, or an arbitrary program — was swallowed into the
     service-start+monitor branch before reaching the `case "$1"`
     statement that already handles those subcommands, hanging the
     container as a daemon instead of running the given command. Changed
     the condition to `if [ -z "$1" ]` so the daemon branch only fires
     when no command was given at all.
  2. The `*/bin/sh | */bin/bash | bash | sh | shell)` case branch
     unconditionally shifted $1 before `__exec_command "$@"` (a bare
     `exec "$@"`). For `docker run image sh -c 'cmd'` this turned the
     exec into `exec -c cmd` (command not found, exit 127) instead of
     `exec sh -c 'cmd'`. Split the branch: real interpreter names
     (*/bin/sh, */bin/bash, bash, sh) now pass through unshifted; the
     "shell" keyword (not a real interpreter) gets its own branch that
     shifts and prepends "sh" to any remaining args, or falls back to a
     bare `__exec_command` (exec bash -l) when none remain.
  Verified `bash -n` passes. Found and fixed upstream in
  dockersrc/go, confirmed identical in this repo's generated
  entrypoint.sh, and mechanically applied here with the same patch.
2026-07-27 23:17:09 -04:00
2026-05-12 20:05:30 -04:00
2023-03-09 22:55:40 -05:00
2026-05-18 15:38:20 -04:00
2026-05-12 20:05:30 -04:00
2026-05-12 20:05:30 -04:00
2026-05-18 15:38:20 -04:00
2026-05-18 15:38:20 -04:00
2026-05-18 15:38:20 -04:00
2026-05-18 15:38:20 -04:00
2025-09-05 13:35:01 -04:00
2026-05-12 20:05:30 -04:00
2026-05-12 20:05:30 -04:00
2026-05-18 15:38:20 -04:00
2026-05-18 15:38:20 -04:00

👋 Welcome to aria2 🚀

A self-contained Docker image running aria2c (multi-protocol download daemon) with the AriaNg web UI served by nginx. Supports HTTP/HTTPS, FTP, BitTorrent, Metalink, and WebSocket RPC.


🚀 Quick start

docker run -d \
  --restart always \
  --name casjaysdevdocker-aria2 \
  --hostname aria2 \
  -e TZ=${TIMEZONE:-America/New_York} \
  -v /srv/docker/aria2/config:/config:z \
  -v /srv/docker/aria2/data:/data:z \
  -p 80:80 \
  -p 6800:6800 \
  -p 6888:6888 \
  casjaysdevdocker/aria2:latest

Open http://localhost to access the AriaNg web interface.


🐳 docker-compose

version: "2"
services:
  aria2:
    image: casjaysdevdocker/aria2:latest
    container_name: casjaysdevdocker-aria2
    hostname: aria2
    restart: always
    environment:
      - TZ=America/New_York
    volumes:
      - /srv/docker/aria2/config:/config:z
      - /srv/docker/aria2/data:/data:z
    ports:
      - 80:80       # AriaNg web UI + proxied RPC
      - 6800:6800   # aria2c direct JSON-RPC / WebSocket
      - 6888:6888   # BitTorrent peer / DHT

🔧 Environment variables

Variable Default Description
TZ America/New_York Container timezone
RPC_PORT 6800 aria2c RPC listen port
RPC_SECRET (unset) aria2c RPC secret token (blank = no auth)
CUSTOM_TRACKER_URL (unset) URL to fetch fresh BT tracker list (P3TERX format)

📁 Volumes

Path Purpose
/config User-editable config — aria2/aria2.conf, aria2/aria2.session, nginx/nginx.conf, AriaNg client config
/data Downloads at /data/downloads/aria2/; logs at /data/logs/{aria2,nginx}/

Seeded on first run from the image defaults. Edit /config/aria2/aria2.conf to tune aria2c; restart the container to apply.


🌐 Ports

Port Protocol Purpose
80 TCP AriaNg web UI (nginx); also proxies /jsonrpc and /rpc to aria2c
6800 TCP aria2c JSON-RPC / WebSocket (direct, bypasses nginx)
6888 TCP/UDP BitTorrent peer connections and DHT

🔨 Build from source

git clone "https://github.com/casjaysdevdocker/aria2" "$HOME/Projects/github/casjaysdevdocker/aria2"
cd "$HOME/Projects/github/casjaysdevdocker/aria2"

# pre-bundle AriaNg (required before buildx — GitHub SSL is blocked inside the sandbox)
mkdir -p rootfs/tmp/ariang-src
curl -fsSL -o rootfs/tmp/ariang-src/AriaNg-1.3.13.zip \
  https://github.com/mayswind/AriaNg/releases/download/1.3.13/AriaNg-1.3.13.zip

buildx

👤 Authors

🤖 casjay: Github 🤖 casjaysdevdocker: Github Docker

S
Description
Docker container for aria2
Readme
1.6 MiB
Languages
JavaScript 67.1%
Shell 31.1%
Dockerfile 1.8%