1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00

updare aria2

This commit is contained in:
kev 2021-09-06 12:01:13 +08:00
parent 67a00953be
commit 4f461507ef
4 changed files with 24 additions and 24 deletions

View File

@ -5,15 +5,15 @@
FROM alpine:3
MAINTAINER EasyPi Software Foundation
ENV TOKEN 00000000-0000-0000-0000-000000000000
ENV TOKEN=00000000-0000-0000-0000-000000000000
RUN set -xe \
&& apk add --no-cache aria2 \
&& aria2c https://github.com/tianon/gosu/releases/download/1.12/gosu-amd64 -o /usr/local/bin/gosu \
&& aria2c https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64 -o /usr/local/bin/gosu \
&& chmod +x /usr/local/bin/gosu \
&& adduser -D aria2
COPY aria2.conf /etc/aria2/
COPY ./data/aria2.conf /etc/aria2/
VOLUME /home/aria2 /etc/aria2
WORKDIR /home/aria2

View File

@ -11,21 +11,21 @@ aria2
```
~/fig/aria2/
├── docker-compose.yml
├── html/
│ ├── README.md
│ ├── TODO.md
│ ├── css/...
│ ├── img/...
│ ├── index.html
│ ├── js/...
│ └── offline.appcache
├── data -> /home/aria2/
└── keys/
├── server.crt
└── server.key
└── data/
├── html/
│ ├── css/...
│ ├── img/...
│ ├── index.html
│ ├── js/...
│ └── offline.appcache
├── keys/
│ ├── server.crt
└── server.key
├── disk/ -> /mnt/usb/
└── aria2.conf
```
> You may make `data` a symbolic link to `/home/aria2` or somewhere else.
> You may make `disk` a symbolic link to `/mnt/usb` or somewhere else.
> To implement disk quota, you can even create a [virtual disk][1].
## docker-compose.yml
@ -40,8 +40,8 @@ services:
ports:
- "6800:6800"
volumes:
- ./data:/home/aria2
- ./keys:/etc/aria2/keys
- ./data/disk:/home/aria2
- ./data/keys:/etc/aria2/keys
environment:
- TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db
restart: unless-stopped
@ -77,9 +77,9 @@ seed-time=0
## server
```bash
$ mkdir -p ~/fig/aria2/{html,keys}/
$ cd ~/fig/aria2/
$ ln -s /home/aria2 data
$ mkdir -p ~/fig/aria2/data/{html,keys}/
$ cd ~/fig/aria2/data
$ ln -s /mnt/usb disk
$ curl -sSL https://github.com/binux/yaaw/archive/master.tar.gz | tar xz --strip 1 -C html
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout keys/server.key -out keys/server.crt
$ vim docker-compose.yml

View File

@ -7,8 +7,8 @@ services:
ports:
- "6800:6800"
volumes:
- ./data:/home/aria2
- ./keys:/etc/aria2/keys
- ./data/var:/home/aria2
- ./data/keys:/etc/aria2/keys
environment:
- TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db
restart: unless-stopped
@ -18,5 +18,5 @@ services:
ports:
- "8080:80"
volumes:
- ./html:/usr/share/nginx/html
- ./data/html:/usr/share/nginx/html
restart: unless-stopped