mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-21 18:06:36 +02:00
update aria2
This commit is contained in:
parent
88378fc6a3
commit
1cd5d434e5
@ -5,20 +5,18 @@
|
||||
FROM alpine:3
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache aria2 \
|
||||
&& 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
|
||||
RUN apk add --no-cache aria2
|
||||
|
||||
COPY ./data/aria2.conf /etc/aria2/
|
||||
VOLUME /data /etc/aria2
|
||||
WORKDIR /data
|
||||
EXPOSE 6800
|
||||
COPY ./data/etc/aria2.conf /etc/aria2/
|
||||
|
||||
ENV DIR=/data
|
||||
ENV PORT=6800
|
||||
ENV TOKEN=00000000-0000-0000-0000-000000000000
|
||||
|
||||
CMD set -xe \
|
||||
&& chown -R aria2:aria2 /data \
|
||||
&& gosu aria2 aria2c --conf-path=/etc/aria2/aria2.conf \
|
||||
--rpc-secret=${TOKEN}
|
||||
WORKDIR $DIR
|
||||
EXPOSE ${PORT}
|
||||
|
||||
CMD aria2c --conf-path=/etc/aria2/aria2.conf \
|
||||
--rpc-listen-port=${PORT} \
|
||||
--rpc-secret=${TOKEN} \
|
||||
--dir=${DIR}
|
||||
|
@ -13,12 +13,13 @@ aria2
|
||||
~/fig/aria2/
|
||||
├── docker-compose.yml
|
||||
└── data/
|
||||
├── disk/ -> /mnt/usb/
|
||||
├── default.conf
|
||||
└── aria2.conf
|
||||
├── var/ -> /mnt/usb/
|
||||
└── etc/
|
||||
├── default.conf
|
||||
└── aria2.conf
|
||||
```
|
||||
|
||||
> You may make `disk` a symbolic link to `/mnt/usb` or somewhere else.
|
||||
> You may make `var` a symbolic link to `/mnt/usb` or somewhere else.
|
||||
> To implement disk quota, you can even create a [virtual disk][5].
|
||||
|
||||
## docker-compose.yml
|
||||
@ -33,10 +34,10 @@ services:
|
||||
ports:
|
||||
- "6800:6800"
|
||||
volumes:
|
||||
- ./data/aria2.conf:/etc/aria2/aria2.conf
|
||||
- ./data/disk:/data
|
||||
- ./data/etc:/etc/aria2/
|
||||
- ./data/var:/data
|
||||
environment:
|
||||
- TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db
|
||||
- TOKEN=0d5e0e73-96f7-4936-b125-e8f5f2296b08
|
||||
restart: unless-stopped
|
||||
|
||||
webui:
|
||||
|
@ -7,10 +7,10 @@ services:
|
||||
ports:
|
||||
- "6800:6800"
|
||||
volumes:
|
||||
- ./data/aria2.conf:/etc/aria2/aria2.conf
|
||||
- ./data/disk:/data
|
||||
- ./data/etc:/etc/aria2/
|
||||
- ./data/var:/data
|
||||
environment:
|
||||
- TOKEN=e6c3778f-6361-4ed0-b126-f2cf8fca06db
|
||||
- TOKEN=0d5e0e73-96f7-4936-b125-e8f5f2296b08
|
||||
restart: unless-stopped
|
||||
|
||||
webui:
|
||||
|
Loading…
Reference in New Issue
Block a user