mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-09 05:15:55 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e427d6243 | ||
|
|
89e6a4eb63 | ||
|
|
f11ddb8352 | ||
|
|
14a3ad5e53 | ||
|
|
2d7a2fbe78 | ||
|
|
4796f04e6f | ||
|
|
6b2f07ca73 | ||
|
|
fb8dae785e | ||
|
|
9d3cd8cff8 | ||
|
|
554489a936 | ||
|
|
5086ded836 | ||
|
|
601b7426c4 | ||
|
|
90a4e37726 | ||
|
|
fc3f3035ac | ||
|
|
b8c7667523 | ||
|
|
3097a69b72 | ||
|
|
8de7bcead4 | ||
|
|
8c303a67e5 | ||
|
|
36d602b6fa | ||
|
|
aa8fa89a56 | ||
|
|
bdd122231c | ||
|
|
5670d183fe | ||
|
|
4d26b3527e | ||
|
|
9aec111d0f | ||
|
|
d70d81ea73 | ||
|
|
8bab5e7280 | ||
|
|
f12066c0fa | ||
|
|
6bca5ee492 | ||
|
|
438542ea38 | ||
|
|
d7e26e6e0e | ||
|
|
cbddc46cb6 | ||
|
|
4e72368e72 | ||
|
|
0c9ac2e563 | ||
|
|
838c645834 | ||
|
|
0b763b18f8 | ||
|
|
22dc0fd7c3 | ||
|
|
f45d151f48 | ||
|
|
0079401849 | ||
|
|
41aa56229b | ||
|
|
0952d90995 | ||
|
|
c4e37d37d3 | ||
|
|
2e621e8121 | ||
|
|
151d20b3ad | ||
|
|
c4afc92c90 | ||
|
|
ef1419fddb | ||
|
|
13e472922a | ||
|
|
4eae54e323 | ||
|
|
14f21d5a24 | ||
|
|
1024aa2a31 | ||
|
|
d77816ef81 | ||
|
|
6c04b6ac25 | ||
|
|
c36e68fb82 | ||
|
|
44bd3f7183 | ||
|
|
6dac58c8a8 | ||
|
|
79c6dd7874 | ||
|
|
c0e66890ad | ||
|
|
e9e3e4083c | ||
|
|
d64c15de5e | ||
|
|
ff51d1ae77 | ||
|
|
c7ade53ded | ||
|
|
a143c3ba81 | ||
|
|
91320c0b5e | ||
|
|
36add55978 |
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [wahyd4]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: https://www.paypal.me/junvzhao
|
||||
@@ -1,14 +1,74 @@
|
||||
name: Docker Image CI
|
||||
on: [push]
|
||||
name: Build and Push docker image
|
||||
on:
|
||||
pull_request:
|
||||
branches: master
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wahyd4/aria2-ariang-docker'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Build and Publish main docker image to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
-
|
||||
name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=wahyd4/aria2-ui
|
||||
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7,linux/arm64
|
||||
VERSION=edge
|
||||
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
fi
|
||||
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
||||
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
|
||||
fi
|
||||
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=version::${VERSION}
|
||||
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
|
||||
--build-arg VCS_REF=${GITHUB_SHA::8} \
|
||||
${TAGS} --file Dockerfile .
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
id: cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
-
|
||||
name: Docker Buildx (build)
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Login to DockerHub
|
||||
if: contains(github.ref, '/heads/master') || contains(github.ref, '/tags/v')
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
name: wahyd4/aria2-ui
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASS }}
|
||||
snapshot: true
|
||||
-
|
||||
name: Push docker images to Dockerhub
|
||||
if: contains(github.ref, '/heads/master') || contains(github.ref, '/tags/v')
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Inspect image
|
||||
if: contains(github.ref, '/heads/master') || contains(github.ref, '/tags/v')
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
name: Docker Image Vulnability Check
|
||||
on: [push]
|
||||
on:
|
||||
pull_request:
|
||||
branches: master
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wahyd4/aria2-ariang-docker'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag local/aria-ui:latest
|
||||
- name: Scan image
|
||||
uses: anchore/scan-action@master
|
||||
uses: anchore/scan-action@v2
|
||||
with:
|
||||
image-reference: "local/aria-ui:latest"
|
||||
dockerfile-path: "./Dockerfile"
|
||||
image: "local/aria-ui:latest"
|
||||
fail-build: true
|
||||
severity-cutoff: high
|
||||
- name: grype scan JSON results
|
||||
run: for j in `ls ./anchore-reports/*.json`; do echo "---- ${j} ----"; cat ${j}; echo; done
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
conf/rclone.conf
|
||||
.devcontainer
|
||||
@@ -1,26 +1,30 @@
|
||||
{$DOMAIN} {
|
||||
proxy / 127.0.0.1:8080 {
|
||||
transparent
|
||||
}
|
||||
#{
|
||||
# auto_https off
|
||||
#}
|
||||
|
||||
proxy /jsonrpc 127.0.0.1:6800 {
|
||||
transparent
|
||||
websocket
|
||||
}
|
||||
{$DOMAIN}
|
||||
|
||||
log stdout
|
||||
errors stdout
|
||||
gzip
|
||||
redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
{$DOMAIN}/ui {
|
||||
redir / /ui/ 301
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
{$DOMAIN}/ui/ {
|
||||
root /usr/local/www/aria2
|
||||
timeouts none
|
||||
gzip
|
||||
log stdout
|
||||
errors stdout
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
|
||||
+13
-33
@@ -1,4 +1,4 @@
|
||||
FROM alpine:latest
|
||||
FROM alpine:edge
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
@@ -6,7 +6,8 @@ WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=0.0.0.0:80
|
||||
ENV ENABLE_RCLONE=true
|
||||
ENV DOMAIN=:80
|
||||
ENV ARIA2_USER=user
|
||||
ENV ARIA2_PWD=password
|
||||
ENV ARIA2_SSL=false
|
||||
@@ -14,41 +15,17 @@ ENV ARIA2_EXTERNAL_PORT=80
|
||||
ENV PUID=1000
|
||||
ENV PGID=1000
|
||||
ENV CADDYPATH=/app
|
||||
ENV RCLONE_CONFIG=/app/conf/rclone.conf
|
||||
ENV XDG_DATA_HOME=/app/.caddy/data
|
||||
ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
|
||||
RUN adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
|
||||
&& caddy_tag=v1.0.4 \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& tar -zxvf caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf caddy_${caddy_tag}_linux_amd64.tar.gz \
|
||||
&& filebrowser_version=v2.5.0 \
|
||||
&& platform=linux-amd64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
|
||||
&& tar -zxvf ${platform}-filebrowser.tar.gz \
|
||||
&& rm -rf ${platform}-filebrowser.tar.gz \
|
||||
&& rm LICENSE README.md CHANGELOG.md \
|
||||
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-${platform}.tgz \
|
||||
&& tar -zxvf forego-stable-${platform}.tgz \
|
||||
&& rm -rf forego-stable-${platform}.tgz \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2 \
|
||||
&& rm -rf init /app/*.txt
|
||||
|
||||
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
|
||||
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
|
||||
ADD conf /app/conf
|
||||
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
|
||||
|
||||
# AriaNg
|
||||
RUN mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& version=1.1.6 \
|
||||
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
|
||||
&& unzip AriaNg-${version}.zip \
|
||||
&& rm -rf AriaNg-${version}.zip \
|
||||
&& chmod -R 755 /usr/local/www/aria2
|
||||
RUN ./install.sh
|
||||
|
||||
RUN rm ./install.sh
|
||||
|
||||
# folder for storing ssl keys
|
||||
VOLUME /app/conf/key
|
||||
@@ -58,4 +35,7 @@ VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
HEALTHCHECK --interval=1m --timeout=3s \
|
||||
CMD curl -f http://localhost || exit 1
|
||||
|
||||
CMD ["./start.sh"]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data
|
||||
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
|
||||
caddy: /app/caddy.sh
|
||||
aria2c: /app/aria2c.sh
|
||||
rclone: /app/rclone.sh
|
||||
|
||||
+25
-18
@@ -5,14 +5,16 @@ Aria2 + AriaNg
|
||||
[](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](https://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
[](https://badges.toozhao.com/stats/01EJ791D8BB43PDS8D7PP7H0YE "Get your own page views count badge on badges.toozhao.com")
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
|
||||
|
||||
|
||||
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
|
||||
|
||||
- [功能特性](#功能特性)
|
||||
- [推荐使用的docker image tag](#推荐使用的docker-image-tag)
|
||||
- [安装于运行](#安装于运行)
|
||||
- [安装与运行](#安装与运行)
|
||||
- [快速运行](#快速运行)
|
||||
- [开启所有功能](#开启所有功能)
|
||||
- [使用docker-compose 运行](#使用docker-compose-运行)
|
||||
@@ -32,33 +34,33 @@ File Browser
|
||||
|
||||
## 功能特性
|
||||
|
||||
* Aria2 (SSL 支持)
|
||||
* AriaNg 通过 UI 来操作,下载文件
|
||||
* [Aria2](https://aria2.github.io) 文件下载工具(支持SSL )
|
||||
* [AriaNg](https://github.com/mayswind/AriaNg) 通过 UI 来操作,下载文件
|
||||
* [Rclone](https://rclone.org) 同步文件到云盘
|
||||
* 自动 HTTPS (Let's Encrypt)
|
||||
* 支持绑定自定义用户ID,可以主机上的非`root`用户,也可以管理下载的文件
|
||||
* Basic Auth 用户认证
|
||||
* 文件管理和视频播放 ([File Browser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
* 支持ARM CPU 架构,因此可以在树莓派中运行,请下载对应的[ARM TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags) 版本, `arm32`或`arm64`
|
||||
* 文件管理和视频播放 ([FileBrowser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
* 支持ARM CPU 架构,因此可以在树莓派等设备上运行,
|
||||
|
||||
## 推荐使用的docker image tag
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
* wahyd4/aria2-ui:arm32
|
||||
* wahyd4/aria2-ui:arm64
|
||||
|
||||
> ‼️ 如果你在莓派上运行本程序,请使用 `arm32` 版本
|
||||
> Docker会为你自动选择对应CPU平台的image. e.g. arm64v8 或者 x86_64 平台
|
||||
|
||||
## 安装于运行
|
||||
## 安装与运行
|
||||
|
||||
### 快速运行
|
||||
|
||||
```shell
|
||||
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
|
||||
```bash
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 -t aria2-ui .
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip/ui/>
|
||||
* FileManger: <http://yourip>
|
||||
* 请使用 admin/admin 进行登录
|
||||
* Aria2: <http://yourip>
|
||||
* Filebrowser: <http://yourip/files>
|
||||
* Rclone: <http://yourip/rclone>
|
||||
* 请使用 admin/admin 进行登录Filebrowser, 在如果没有修改`ARIA2_USER`,`ARIA2_PWD`的情况下,请使用`user`/`password`登录`Rclone`
|
||||
### 开启所有功能
|
||||
```bash
|
||||
docker run -d --name ariang \
|
||||
@@ -76,7 +78,7 @@ File Browser
|
||||
-v /yourdata:/data \
|
||||
-v /app/a.db:/app/filebrowser.db \
|
||||
-v /yoursslkeys/:/app/conf/key \
|
||||
-v <the folder of aria2.conf and aria2.session>:/app/conf \
|
||||
-v <conf files folder>:/app/conf \
|
||||
wahyd4/aria2-ui
|
||||
```
|
||||
### 使用docker-compose 运行
|
||||
@@ -101,8 +103,9 @@ services:
|
||||
### 支持的 Docker 环境变量
|
||||
|
||||
* ENABLE_AUTH 启用 Basic auth(网页简单认证) 用户认证
|
||||
* ARIA2_USER Basic Auth 用户认证用户名
|
||||
* ARIA2_PWD Basic Auth 密码
|
||||
* ENABLE_RCLONE 是否启用 RCLONE,由于Rclone 的初次运行需要从Github 下载文件,由于你懂的原因,可能文件下载失败,进而导致整个程序崩溃,这时你需要设置为`false`
|
||||
* ARIA2_USER Basic Auth 用户认证用户名,Rclone也使用该参数
|
||||
* ARIA2_PWD Basic Auth 密码,Rclone也使用该参数
|
||||
* ARIA2_EXTERNAL_PORT 从外部可以访问到的 Aria2 端口,默认为 HTTP 的`80`
|
||||
* PUID 需要绑定主机的Linux用户ID,可以通过`cat /etc/passwd` 查看用户列表, 默认UID 是`1000`
|
||||
* PGID 需要绑定的主机的Linux 用户组ID,默认GID 是`1000`
|
||||
@@ -113,7 +116,10 @@ services:
|
||||
### 支持的 Docker volume 属性
|
||||
* `/data` 用来放置所有下载的文件的目录
|
||||
* `/app/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt`, Key 文件的名字必须是 `aria2.key`
|
||||
* `/app/conf` 该目录下可以放置你的自定义`aria2.conf`配置文件,`aria2.session`,且必须包含这两个文件。第一次使用`aria2.session`时,创建一个空文件即可,该文件会包含aria2当前的下载列表,这样即使容器被销毁也不用担心文件列表丢失了。你也可以直接拷贝当前项目下`conf`目录中的两个文件并使用。
|
||||
* `/app/conf` 该目录下可以放置你的自定义`aria2.conf`配置文件,`aria2.session`,且必须包含这两个文件。第一次使用`aria2.session`时,创建一个空文件即可,该文件会包含aria2当前的下载列表,这样即使容器被销毁也不用担心文件列表丢失了。你也可以直接拷贝当前项目下`conf`目录中的两个文件并使用。如需映射rclone.conf到容器内,请将其就放置于该目录下。因此配置文件目录支持的所有配置文件为:
|
||||
* aria2.conf
|
||||
* aria2.session
|
||||
* rclone.conf
|
||||
* `/app/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
|
||||
|
||||
## 自动 SSL
|
||||
@@ -142,3 +148,4 @@ docker build -t aria2-ui .
|
||||
1. 当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。你可以设置`ARIA2_EXTERNAL_PORT`后重建你的容器。
|
||||
2. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
|
||||
3. 如果你遇到了和 `setcap` 相关的错误,很大程度说明你说运行的Linux不支持使用非`root`用户来运行本Docker 镜像,因此请显式地设置环境变量`PUID` `PGID` 为 `0` ,也就是使用`root` 来运行
|
||||
4. 如何配置`Rclone`? 如果你想连接`Google Drive` 类似的云存储平台,很遗憾你不能通过浏览器配置,因为网页版本`Oauth` 方式在这里是用不了的,你只能通过命令行的形式来配置,即`rclone config`. 详请请参考官网 [Configuring rclone on a remote / headless machine](https://rclone.org/remote_setup) 以及详细步骤请参考 [issue](https://github.com/wahyd4/aria2-ariang-docker/issues/118)
|
||||
|
||||
@@ -5,6 +5,9 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
[](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](https://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
[](https://badges.toozhao.com/stats/aria2-ariang-docker "Page Views Count")
|
||||
|
||||
**If you like this project, please consider support me / 如果喜欢本项目,请考虑打赏,谢谢!**
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
|
||||
|
||||
@@ -16,17 +19,17 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
- [Run with docker-compose](#run-with-docker-compose)
|
||||
- [Supported Environment Variables](#supported-environment-variables)
|
||||
- [Supported Volumes](#supported-volumes)
|
||||
- [Auto SSL enabling](#auto-ssl-enabling)
|
||||
- [Auto HTTPS enabling](#auto-https-enabling)
|
||||
- [Build the image by yourself](#build-the-image-by-yourself)
|
||||
- [Docker Hub](#docker-hub)
|
||||
- [Usage it in Docker compose](#usage-it-in-docker-compose)
|
||||
- [FAQ](#faq)
|
||||
|
||||
One Docker image for all file downloading, managing, playing and evening sharing platforms!
|
||||
One Docker image for file downloading, managing, sharing, as well as video playing and evening cloud storage synchronization.
|
||||
|
||||
Besides, it's pretty small and ARM CPU supported which means you can run it on Raspberry Pi🍓.
|
||||
Furthermore, it's pretty small and ARM CPU compatible which means you can also run it on Raspberry Pi🍓.
|
||||
|
||||
Last but not least, SSL enabling so easy!
|
||||
Last but not least, Auto HTTPS can't be more easy!
|
||||
|
||||
AriaNG
|
||||

|
||||
@@ -36,21 +39,21 @@ File Browser
|
||||
|
||||
## Features
|
||||
|
||||
* Aria2 (SSL support)
|
||||
* AriaNg
|
||||
* [Aria2 (SSL support)](https://aria2.github.io)
|
||||
* [AriaNg](https://github.com/mayswind/AriaNg)
|
||||
* [Rclone](https://rclone.org/)
|
||||
* Auto HTTPS (Let's Encrypt)
|
||||
* Bind non root user into container, so non root user can also manage downloaded files.
|
||||
* Basic Auth
|
||||
* File indexing and video playing ([File Browser](https://filebrowser.xyz/))
|
||||
* Add support for ARM CPUs, please choose correct [docker image TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
|
||||
* Support ARM CPUs as well, all supported CPU platforms can be found [here](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
|
||||
* Cloud Storage platforms synchronization
|
||||
|
||||
## Recommended versions
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
* wahyd4/aria2-ui:arm32
|
||||
* wahyd4/aria2-ui:arm64
|
||||
|
||||
> ‼️ If you plan to run this docker image on Raspberry Pi,please use tag `arm32`
|
||||
> Docker will pick the the proper ARCH for you. e.g. arm64v8 or x86_64
|
||||
|
||||
## How to run
|
||||
|
||||
@@ -60,9 +63,10 @@ File Browser
|
||||
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip/ui/>
|
||||
* FileManger: <http://yourip>
|
||||
* Please use `admin`/`admin` as username and password to login for the first time.
|
||||
* Aria2: <http://yourip>
|
||||
* FileManger: <http://yourip/files>
|
||||
* Rclone: <http://yourip/rclone>
|
||||
* Please use `admin`/`admin` as username and password to login `Filebrowser` for the first time. And use `user`/`password` to login `Rclone` if you don't update `ARIA2_USER` and `ARIA2_PWD`
|
||||
|
||||
### Full features run
|
||||
|
||||
@@ -77,17 +81,17 @@ File Browser
|
||||
-e DOMAIN=https://example.com \
|
||||
-e ARIA2_SSL=false \
|
||||
-e ARIA2_USER=user \
|
||||
-e ARIA2_PWD=pwd \
|
||||
-e ARIA2_PWD=password \
|
||||
-e ARIA2_EXTERNAL_PORT=443 \
|
||||
-v /yourdata:/data \
|
||||
-v /app/a.db:/app/filebrowser.db \
|
||||
-v /yoursslkeys/:/app/conf/key \
|
||||
-v <the folder of aria2.conf and aria2.session>:/app/conf \
|
||||
-v /to_yoursslkeys/:/app/conf/key \
|
||||
-v <conf files folder>:/app/conf \
|
||||
wahyd4/aria2-ui
|
||||
```
|
||||
### Run with docker-compose
|
||||
|
||||
If you wanna get rid of those annoying command line things, just put the following sample content into `docker-compose.yaml`
|
||||
If you would like to get rid of those annoying command line commands, then just put the following sample content into `docker-compose.yaml`
|
||||
```yaml
|
||||
version: "3.5"
|
||||
services:
|
||||
@@ -104,13 +108,14 @@ services:
|
||||
volumes:
|
||||
- ./data:/data
|
||||
```
|
||||
Then just run `docker-compose up -d`, that's it!
|
||||
Then simply run `docker-compose up -d`, that's it!
|
||||
|
||||
### Supported Environment Variables
|
||||
|
||||
* ENABLE_AUTH whether to enable Basic auth
|
||||
* ARIA2_USER Basic Auth username
|
||||
* ARIA2_PWD Basic Auth password
|
||||
* ENABLE_RCLONE whether to disable Rclone, if you running this container offline or do not have stable connection to Github, please set to `false`
|
||||
* ARIA2_USER Basic Auth username, Rclone GUI uses it as well.
|
||||
* ARIA2_PWD Basic Auth password, Rclone GUI uses it as well.
|
||||
* ARIA2_EXTERNAL_PORT The Aria2 port which exposed to public to access to
|
||||
* PUID Bind Linux UID into container which means you can use non `root` user to manage downloaded files, default UID is `1000`
|
||||
* PGID Bind Linux GID into container, default GID is 1000
|
||||
@@ -119,22 +124,27 @@ Then just run `docker-compose up -d`, that's it!
|
||||
|
||||
|
||||
### Supported Volumes
|
||||
* `/data` The folder which contains all the files you download.
|
||||
* `/app/conf/key` The folder which stored Aria2 SSL `certificate` and `key` file. `Notice`: The certificate file should be named `aria2.crt` and the key file should be named `aria2.key`
|
||||
* `/app/conf` The Aria2 configuration and file session folder. Make sure you have `aria2.conf` and `aria2.session` file. For the first time `aria2.session` just need to be a empty file can be appended. You can also user the templates for these two file in the `conf` folder of this project. **Warning: if you don't mount `/app/conf`, whenever the container restart, you'll lose your downloading progress.**
|
||||
* `/data` The folder contains all the files you download.
|
||||
* `/app/conf/key` The folder which stores Aria2 SSL `certificate` and `key` file. `Notice`: The certificate file should be named `aria2.crt` and the key file should be named `aria2.key`
|
||||
* `/app/conf` The Aria2 configuration and file session folder. Make sure you have `aria2.conf` and `aria2.session` file. For the first time `aria2.session` just need to be a empty file can be appended. You can also user the templates for these two file in the `conf` folder of this project. Please put your `rclone.conf` in this folder as well if you'd mount it to Rclone. So all the config files supported in this folder are:
|
||||
* aria2.conf
|
||||
* aria2.session
|
||||
* rclone.conf
|
||||
|
||||
**Warning: if you don't mount `/app/conf`, whenever the container restarts, you'll lose your downloading progress.**
|
||||
* `/app/filebrowser.db` File Browser settings database, make sure you make a empty file first on your host.
|
||||
|
||||
## Auto SSL enabling
|
||||
## Auto HTTPS enabling
|
||||
|
||||
Make sure you have add proper `A` record point to the host you running to your domain `DNS` record list, then just add `e` option to bind the `https` domain when you run the image
|
||||
Make sure you have added proper `A` record point to the host you running to your domain `DNS` record list, then just add `e` option to bind the `https` domain when you run the image
|
||||
|
||||
```bash
|
||||
docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com wahyd4/aria2-ui
|
||||
```
|
||||
## Build the image by yourself
|
||||
|
||||
```
|
||||
docker build -t aria2-ui .
|
||||
```bash
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 -t aria2-ui .
|
||||
```
|
||||
|
||||
## Docker Hub
|
||||
@@ -149,3 +159,4 @@ docker build -t aria2-ui .
|
||||
1. When you running the docker image with non `80` port or you have HTTPS enabled, you will meet the error says `Aria2 Status Disconnected`, then you will need to set `ARIA2_EXTERNAL_PORT` and recreate your container.
|
||||
2. If there is no speed at all when you downloading a BitTorrent file, please try to use a popular torrent file first to help the application to cache `DHT` file. Then the speed should get fast and fast, as well as downloading other links.
|
||||
3. If you see any errors related to `setcap` which probably means the Linux you are running doesn't support running this application with `non-root` user. So please specify the `PUID` and `PGID` to `0` explicitly to use `root` user to run it.
|
||||
4. How can I get `Rclone` authenticated? Due to Rclone is running in this docker image only as a component rather than an application, you can only interact with it via `/rclone` endpoint, and no other ports. So the web browser authentication mechanism doesn't work here. Please configure Rclone through command line within the container. You can follow the official doc [Configuring rclone on a remote / headless machine](https://rclone.org/remote_setup) or this [issue](https://github.com/wahyd4/aria2-ariang-docker/issues/118)
|
||||
|
||||
+26
-20
@@ -1,28 +1,34 @@
|
||||
{$DOMAIN} {
|
||||
proxy / 127.0.0.1:8080 {
|
||||
transparent
|
||||
}
|
||||
#{
|
||||
# auto_https off
|
||||
#}
|
||||
|
||||
proxy /jsonrpc 127.0.0.1:6800 {
|
||||
transparent
|
||||
websocket
|
||||
}
|
||||
{$DOMAIN}
|
||||
|
||||
gzip
|
||||
log stdout
|
||||
errors stdout
|
||||
basicauth /* {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
{$DOMAIN}/ui {
|
||||
redir / /ui/ 301
|
||||
redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
{$DOMAIN}/ui/ {
|
||||
root /usr/local/www/aria2
|
||||
timeouts none
|
||||
gzip
|
||||
log stdout
|
||||
errors stdout
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
FROM arm32v6/alpine:latest
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=0.0.0.0:80
|
||||
ENV ARIA2_USER=user
|
||||
ENV ARIA2_PWD=password
|
||||
ENV ARIA2_SSL=false
|
||||
ENV ARIA2_EXTERNAL_PORT=80
|
||||
ENV PUID=1000
|
||||
ENV PGID=1000
|
||||
ENV CADDYPATH=/app
|
||||
|
||||
RUN adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
|
||||
&& curl https://getcaddy.com | bash -s personal \
|
||||
&& filebrowser_version=v2.2.0 \
|
||||
&& platform=linux-armv6 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
|
||||
&& tar -zxvf ${platform}-filebrowser.tar.gz \
|
||||
&& rm -rf ${platform}-filebrowser.tar.gz \
|
||||
&& rm LICENSE README.md \
|
||||
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm.tgz \
|
||||
&& tar -zxvf forego-stable-linux-arm.tgz \
|
||||
&& rm -rf forego-stable-linux-arm.tgz \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2
|
||||
|
||||
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
|
||||
ADD conf /app/conf
|
||||
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
|
||||
|
||||
# AriaNg
|
||||
|
||||
RUN mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& version=1.1.6 \
|
||||
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
|
||||
&& unzip AriaNg-${version}.zip \
|
||||
&& rm -rf AriaNg-${version}.zip \
|
||||
&& chmod -R 755 /usr/local/www/aria2
|
||||
|
||||
#The folder to store ssl keys
|
||||
VOLUME /app/conf/key
|
||||
# User downloaded files
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["./start.sh"]
|
||||
@@ -1,55 +0,0 @@
|
||||
FROM arm64v8/alpine:latest
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=0.0.0.0:80
|
||||
ENV ARIA2_USER=user
|
||||
ENV ARIA2_PWD=password
|
||||
ENV ARIA2_SSL=false
|
||||
ENV ARIA2_EXTERNAL_PORT=80
|
||||
ENV PUID=1000
|
||||
ENV PGID=1000
|
||||
ENV CADDYPATH=/app
|
||||
|
||||
RUN adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
|
||||
&& curl https://getcaddy.com | bash -s personal \
|
||||
&& filebrowser_version=v2.2.0 \
|
||||
&& platform=linux-arm64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
|
||||
&& tar -zxvf ${platform}-filebrowser.tar.gz \
|
||||
&& rm -rf ${platform}-filebrowser.tar.gz \
|
||||
&& rm LICENSE README.md \
|
||||
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm64.tgz \
|
||||
&& tar -zxvf forego-stable-linux-arm64.tgz \
|
||||
&& rm -rf forego-stable-linux-arm64.tgz \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2
|
||||
|
||||
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
|
||||
ADD conf /app/conf
|
||||
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
|
||||
|
||||
# AriaNg
|
||||
RUN mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& version=1.1.6 \
|
||||
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
|
||||
&& unzip AriaNg-${version}.zip \
|
||||
&& rm -rf AriaNg-${version}.zip \
|
||||
&& chmod -R 755 /usr/local/www/aria2
|
||||
|
||||
#The folder to store ssl keys
|
||||
VOLUME /app/conf/key
|
||||
# User downloaded files
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["./start.sh"]
|
||||
@@ -4,9 +4,14 @@ echo "Run aria2c and ariaNG"
|
||||
if [ "$ENABLE_AUTH" = "true" ]; then
|
||||
echo "Using Basic Auth config file "
|
||||
export CADDY_FILE=/usr/local/caddy/SecureCaddyfile
|
||||
|
||||
echo "**** generate basic auth password for caddy ****"
|
||||
ARIA2_PWD_ENCRYPT=`caddy hash-password -plaintext ${ARIA2_PWD}`
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' /usr/local/caddy/SecureCaddyfile
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' /usr/local/caddy/SecureCaddyfile
|
||||
else
|
||||
echo "Using caddy without Basic Auth"
|
||||
export CADDY_FILE=/usr/local/caddy/Caddyfile
|
||||
fi
|
||||
|
||||
/usr/local/bin/caddy -quic --conf ${CADDY_FILE}
|
||||
/usr/local/bin/caddy run -config ${CADDY_FILE} -adapter=caddyfile
|
||||
|
||||
@@ -4,13 +4,19 @@ echo "**** update uid and gid to ${PUID}:${PGID} ****"
|
||||
groupmod -o -g "$PGID" junv
|
||||
usermod -o -u "$PUID" junv
|
||||
|
||||
mkdir -p /app/.caddy
|
||||
mkdir -p /app/.cache
|
||||
|
||||
chown -R junv:junv \
|
||||
/app \
|
||||
/app/.caddy \
|
||||
/app/.cache \
|
||||
/usr/local \
|
||||
/var/log \
|
||||
/data
|
||||
|
||||
chmod +x /app/caddy.sh \
|
||||
/app/rclone.sh \
|
||||
/app/aria2c.sh
|
||||
|
||||
echo "**** give caddy permissions to use low ports ****"
|
||||
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
#! /bin/sh -eux
|
||||
|
||||
echo "Set variables for $(arch)"
|
||||
|
||||
caddy_version=2.3.0
|
||||
filebrowser_version=v2.11.0
|
||||
rclone_version=v1.53.3
|
||||
ariang_version=1.1.7
|
||||
|
||||
case "$(arch)" in
|
||||
|
||||
x86_64)
|
||||
platform=linux-amd64
|
||||
caddy_file=caddy_${caddy_version}_linux_amd64.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-${platform}.zip
|
||||
forego_file=forego-stable-${platform}.tgz
|
||||
;;
|
||||
armv7l)
|
||||
platform=linux-armv7
|
||||
caddy_file=caddy_${caddy_version}_linux_armv7.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-linux-arm-v7.zip
|
||||
forego_file=forego-stable-linux-arm.tgz
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
platform=linux-arm64
|
||||
caddy_file=caddy_${caddy_version}_linux_arm64.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-${platform}.zip
|
||||
forego_file=forego-stable-${platform}.tgz
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "unsupported arch $(arch), exit now"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
filebrowser_file=${platform}-filebrowser.tar.gz
|
||||
ariang_file=AriaNg-${ariang_version}.zip
|
||||
|
||||
adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar mailcap --no-cache \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_version}/${caddy_file} \
|
||||
&& tar -zxf ${caddy_file} \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf ${caddy_file} \
|
||||
&& platform=linux-amd64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${filebrowser_file} \
|
||||
&& tar -zxf ${filebrowser_file} \
|
||||
&& rm -rf ${filebrowser_file} \
|
||||
&& rm LICENSE README.md CHANGELOG.md \
|
||||
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/${forego_file} \
|
||||
&& tar -zxf ${forego_file} \
|
||||
&& rm -rf ${forego_file} \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2 \
|
||||
&& rm -rf init /app/*.txt \
|
||||
&& curl -O https://downloads.rclone.org/${rclone_version}/${rclone_file} \
|
||||
&& unzip ${rclone_file} \
|
||||
&& cd rclone-* \
|
||||
&& cp rclone /usr/local/bin/ \
|
||||
&& chown junv:junv /usr/local/bin/rclone \
|
||||
&& chmod 755 /usr/local/bin/rclone \
|
||||
&& rm /app/${rclone_file} \
|
||||
&& rm -rf /app/rclone-* \
|
||||
&& mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${ariang_version}/${ariang_file} \
|
||||
&& unzip ${ariang_file} \
|
||||
&& rm -rf ${ariang_file} \
|
||||
&& chmod -R 755 /usr/local/www/aria2 \
|
||||
@@ -0,0 +1,14 @@
|
||||
#! /bin/bash -eu
|
||||
|
||||
if [ "$ENABLE_RCLONE" = "true" ]; then
|
||||
echo "Start Rclone, please make sure you can connect to Github website. if not, please set docker env ENABLE_RCLONE=false"
|
||||
rclone rcd --rc-web-gui \
|
||||
--rc-web-gui-no-open-browser \
|
||||
--rc-addr :5572 \
|
||||
--rc-user $ARIA2_USER \
|
||||
--rc-pass $ARIA2_PWD \
|
||||
--cache-dir /app/.cache
|
||||
else
|
||||
echo "Skip starting Rclone as it's been disabled"
|
||||
sleep 3650d
|
||||
fi
|
||||
Reference in New Issue
Block a user