Compare commits

...
23 Commits
Author SHA1 Message Date
junv 6bca5ee492 #87 Upgrade arm dockerfiles to support caddy 2 2020-11-15 23:42:40 +11:00
junv 438542ea38 #87 Enable auto ssl 2020-11-15 23:20:41 +11:00
junv d7e26e6e0e #87 Update secureCaddyfile with caddy 2 2020-11-15 23:20:41 +11:00
junv cbddc46cb6 #87 Solve the caddy and rclone's permission issues when running user is not root 2020-11-15 23:20:41 +11:00
junv 4e72368e72 Start upgrading caddy to 2 2020-11-15 23:20:41 +11:00
junv 0c9ac2e563 Polish readme 2020-10-01 23:58:04 +10:00
junv 838c645834 update rclone 2020-10-01 23:41:53 +10:00
junv 0b763b18f8 Update filebrowser to 2.7.0 file arm cpu platforms 2020-10-01 23:34:05 +10:00
junvandGitHub 22dc0fd7c3 Merge pull request #122 from wahyd4/vulnerability-scan
Fix image vulnerability scan failure
2020-10-01 23:32:53 +10:00
junv f45d151f48 use v1 to fix the build 2020-10-01 23:29:55 +10:00
junv 0079401849 build fix 2020-10-01 23:27:26 +10:00
junv 41aa56229b Fix image vulnerability scan failure 2020-10-01 23:23:02 +10:00
junvandGitHub 0952d90995 Merge pull request #120 from wahyd4/rclone-docs
Add docs about how to config rclone
2020-09-15 17:55:34 +10:00
junv c4e37d37d3 Add docs about how to use rclone 2020-09-15 17:54:07 +10:00
junvandGitHub 2e621e8121 Merge pull request #117 from DanielZhang17/master
fix filebrowser inline preview problem
2020-09-15 13:29:40 +10:00
Anran ZhangandGitHub 151d20b3ad Merge pull request #1 from DanielZhang17/fb-fix/etc/mime.types
Add mailcap to fix some filebrowser preview issues
2020-09-14 20:33:09 -03:00
Anran ZhangandGitHub c4afc92c90 Add mailcap to fix some inline preview issues
fix /etc/mime.types file is missing problem that causes the filebrowser not treating some videos as video files and showing no inline preview window.
2020-09-14 20:29:55 -03:00
junvandGitHub ef1419fddb Update README.CN.md 2020-09-15 07:42:02 +10:00
junvandGitHub 13e472922a Update README.md 2020-09-14 09:15:29 +10:00
junvandGitHub 4eae54e323 Merge pull request #116 from wahyd4/fb-2.7.0
Update filebrowser version
2020-09-13 11:28:19 +10:00
junv 14f21d5a24 Update filebrowser versions 2020-09-13 11:27:46 +10:00
junvandGitHub 1024aa2a31 Merge pull request #114 from wahyd4/healthcheck
Add default healthcheck script
2020-09-13 11:14:50 +10:00
junv d77816ef81 Add default healthcheck script 2020-09-13 11:09:27 +10:00
11 changed files with 102 additions and 99 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ jobs:
- 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@v1
with:
image-reference: "local/aria-ui:latest"
dockerfile-path: "./Dockerfile"
fail-build: true
severity-cutoff: high
+2
View File
@@ -0,0 +1,2 @@
conf/rclone.conf
.devcontainer
+19 -29
View File
@@ -1,37 +1,27 @@
{$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 /ui/ 301
redir /rclone /rclone/ 301
route /rclone/* {
uri strip_prefix /rclone
reverse_proxy http://localhost:5572
}
{$DOMAIN}/ui {
redir / /ui/ 301
route /ui/* {
uri strip_prefix /ui
root * /usr/local/www/aria2
file_server
}
{$DOMAIN}/ui/ {
root /usr/local/www/aria2
timeouts none
gzip
errors stderr
}
reverse_proxy 127.0.0.1:8080
reverse_proxy /jsonrpc 127.0.0.1:6800
{$DOMAIN}/rclone {
redir / /rclone/ 301
}
{$DOMAIN}/rclone/ {
proxy / 127.0.0.1:5572/ {
transparent
}
gzip
errors stderr
encode gzip
log {
output stderr
}
+17 -14
View File
@@ -6,7 +6,7 @@ WORKDIR /app
ENV RPC_SECRET=""
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV DOMAIN=http://localhost
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV ARIA2_SSL=false
@@ -15,16 +15,22 @@ 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
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
ADD conf /app/conf
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
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 \
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar mailcap --no-cache \
&& caddy_tag=2.2.1 \
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${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 \
&& filebrowser_version=v2.7.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 \
@@ -43,17 +49,11 @@ RUN adduser -D -u 1000 junv \
&& chown junv:junv /usr/local/bin/rclone \
&& chmod 755 /usr/local/bin/rclone \
&& rm /app/rclone-*.zip \
&& rm -rf /app/rclone-*
ADD 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 \
&& rm -rf /app/rclone-* \
&& mkdir /usr/local/www/aria2/Download \
&& cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.6 \
&& version=1.1.7 \
&& 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 \
@@ -67,4 +67,7 @@ VOLUME /data
EXPOSE 80 443
HEALTHCHECK --interval=1m --timeout=3s \
CMD curl -f http://localhost || exit 1
CMD ["./start.sh"]
+3
View File
@@ -5,9 +5,11 @@ Aria2 + AriaNg
[![](https://images.microbadger.com/badges/image/wahyd4/aria2-ui.svg)](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
[![Page Views Count](https://badges.toozhao.com/badges/01EJ791D8BB43PDS8D7PP7H0YE/green.svg)](https://badges.toozhao.com/badges/01EJ791D8BB43PDS8D7PP7H0YE/green.svg "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 中运行本程序。
- [功能特性](#功能特性)
@@ -147,3 +149,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)
+14 -12
View File
@@ -7,7 +7,7 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
[![Page Views Count](https://badge.home.toozhao.com/svg/aria2-ariang-docker)](https://badge.home.toozhao.com/svg/aria2-ariang-docker "Page Views Count")
**If you like this, please consider support me / 如果喜欢,请考虑打赏,谢谢!**
**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"/>
@@ -19,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🍓. (**with proper arm docker image tag**)
Last but not least, SSL enabling so easy!
Last but not least, Auto HTTPS can't be more easy!
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.jpg)
@@ -46,7 +46,8 @@ File Browser
* 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, but please choose a proper [docker image TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
* Cloud Storage platforms synchronization
## Recommended versions
@@ -92,7 +93,7 @@ File Browser
```
### 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:
@@ -109,7 +110,7 @@ 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
@@ -124,8 +125,8 @@ 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`
* `/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
@@ -134,9 +135,9 @@ Then just run `docker-compose up -d`, that's it!
**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
@@ -159,3 +160,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)
+20 -31
View File
@@ -1,42 +1,31 @@
{$DOMAIN} {
proxy / 127.0.0.1:8080 {
transparent
}
#{
# auto_https off
#}
proxy /jsonrpc 127.0.0.1:6800 {
transparent
websocket
}
{$DOMAIN}
proxy /rclone 127.0.0.1:5572 {
transparent
}
redir /ui /ui/ 301
redir /rclone /rclone/ 301
gzip
errors stderr
route /rclone/* {
uri strip_prefix /rclone
reverse_proxy http://localhost:5572
}
{$DOMAIN}/ui {
redir / /ui/ 301
route /ui/* {
uri strip_prefix /ui
root * /usr/local/www/aria2
file_server
}
{$DOMAIN}/ui/ {
root /usr/local/www/aria2
timeouts none
gzip
errors stderr
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
basicauth /ui/* {
ARIA2_USER ARIA2_PWD_ENCRYPT
}
{$DOMAIN}/rclone {
redir / /rclone/ 301
}
reverse_proxy 127.0.0.1:8080
reverse_proxy /jsonrpc 127.0.0.1:6800
{$DOMAIN}/rclone/ {
proxy / 127.0.0.1:5572/ {
transparent
}
gzip
errors stderr
encode gzip
log {
output stderr
}
+7 -5
View File
@@ -6,7 +6,7 @@ WORKDIR /app
ENV RPC_SECRET=""
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV DOMAIN=http://localhost
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV ARIA2_SSL=false
@@ -15,16 +15,18 @@ 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_arm7.tar.gz \
&& caddy_tag=2.2.1 \
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
&& tar -zxvf caddy_*.tar.gz \
&& mv caddy /usr/local/bin/ \
&& rm -rf caddy_*.tar.gz \
&& filebrowser_version=v2.2.0 \
&& filebrowser_version=v2.7.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 \
@@ -36,7 +38,7 @@ RUN adduser -D -u 1000 junv \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2 \
&& rm -rf init /app/*.txt \
&& curl -O https://downloads.rclone.org/v1.53.0/rclone-v1.53.0-linux-arm.zip \
&& curl -O https://downloads.rclone.org/v1.53.1/rclone-v1.53.1-linux-arm.zip \
&& unzip rclone-*.zip \
&& cd rclone-* \
&& cp rclone /usr/local/bin/ \
+7 -5
View File
@@ -6,7 +6,7 @@ WORKDIR /app
ENV RPC_SECRET=""
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV DOMAIN=http://localhost
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV ARIA2_SSL=false
@@ -15,16 +15,18 @@ 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_arm64.tar.gz \
&& caddy_tag=2.2.1 \
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
&& tar -zxvf caddy_*.tar.gz \
&& mv caddy /usr/local/bin/ \
&& rm -rf caddy_*.tar.gz \
&& filebrowser_version=v2.2.0 \
&& filebrowser_version=v2.7.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 \
@@ -36,7 +38,7 @@ RUN adduser -D -u 1000 junv \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2 \
&& rm -rf init /app/*.txt \
&& curl -O https://downloads.rclone.org/v1.53.0/rclone-v1.53.0-linux-arm.zip \
&& curl -O https://downloads.rclone.org/v1.53.1/rclone-v1.53.1-linux-arm.zip \
&& unzip rclone-*.zip \
&& cd rclone-* \
&& cp rclone /usr/local/bin/ \
+6 -1
View File
@@ -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
+5
View File
@@ -4,8 +4,13 @@ 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