An open API service indexing awesome lists of open source software.

https://github.com/haliliceylan/aria2c-docker


https://github.com/haliliceylan/aria2c-docker

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# aria2c-docker

A lightweight Docker image for aria2c download utility with automatic GitHub Actions build and push to GitHub Container Registry.

## Features

- ✅ Lightweight Alpine Linux base
- ✅ Non-root user for security
- ✅ RPC interface enabled by default
- ✅ Multi-architecture support (amd64, arm64)
- ✅ Automatic builds on push
- ✅ Published to GitHub Container Registry

## Usage

### Basic Download
```bash
docker run --rm -it \
--user "$(id -u):$(id -g)" \
-v "$(pwd)":/downloads \
ghcr.io/haliliceylan/aria2c-docker:latest \
"https://example.com/file.zip"
```

### With RPC Server (Web Interface Compatible)
```bash
docker run -d \
--name aria2c \
--user "$(id -u):$(id -g)" \
-p 6800:6800 \
-v "$(pwd)":/downloads \
--restart unless-stopped \
ghcr.io/haliliceylan/aria2c-docker:latest
```

### Custom Configuration
If you want to use your own aria2.conf file:
```bash
docker run -d \
--name aria2c \
--user "$(id -u):$(id -g)" \
-p 6800:6800 \
-v "$(pwd)":/downloads \
-v "/path/to/your/aria2.conf":/tmp/aria2.conf \
--restart unless-stopped \
ghcr.io/haliliceylan/aria2c-docker:latest \
--conf-path=/tmp/aria2.conf
```

## Useful Aliases

Add these to your `~/.bashrc` or `~/.zshrc` for convenient usage:

```bash
# Basic aria2c alias with proper user mapping and TTY for real-time updates
alias aria2c='docker run --rm -it \
--user "$(id -u):$(id -g)" \
-v "$(pwd)":/downloads \
ghcr.io/haliliceylan/aria2c-docker:latest'

# Daemon mode with RPC and proper user mapping
alias aria2c-daemon='docker run -d \
--name aria2c \
--user "$(id -u):$(id -g)" \
-p 6800:6800 \
-v "$(pwd)":/downloads \
--restart unless-stopped \
ghcr.io/haliliceylan/aria2c-docker:latest'

# Stop daemon
alias aria2c-stop='docker stop aria2c && docker rm aria2c'
```

## Building Locally

```bash
git clone https://github.com/haliliceylan/aria2c-docker.git
cd aria2c-docker
docker build -t aria2c-local .
```

## Web Interface

You can use aria2c with web interfaces like:
- [AriaNg](https://github.com/mayswind/AriaNg)
- [webui-aria2](https://github.com/ziahamza/webui-aria2)

Just connect to `http://localhost:6800/jsonrpc` when running in daemon mode.

## License

This project is open source and available under the MIT License.