1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-28 09:41:20 +00: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

@ -5,15 +5,15 @@
FROM alpine:3 FROM alpine:3
MAINTAINER EasyPi Software Foundation MAINTAINER EasyPi Software Foundation
ENV TOKEN 00000000-0000-0000-0000-000000000000 ENV TOKEN=00000000-0000-0000-0000-000000000000
RUN set -xe \ RUN set -xe \
&& apk add --no-cache aria2 \ && 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 \ && chmod +x /usr/local/bin/gosu \
&& adduser -D aria2 && adduser -D aria2
COPY aria2.conf /etc/aria2/ COPY ./data/aria2.conf /etc/aria2/
VOLUME /home/aria2 /etc/aria2 VOLUME /home/aria2 /etc/aria2
WORKDIR /home/aria2 WORKDIR /home/aria2

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

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