mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
update
This commit is contained in:
parent
75f705dd7c
commit
5d502b94e0
@ -7,16 +7,15 @@ MAINTAINER kev <noreply@datageek.info>
|
||||
|
||||
ENV DIR /var/lib/aria2
|
||||
ENV ETC /etc/aria2
|
||||
ENV CERT $ETC/server-cert.pem
|
||||
ENV KEY $ETC/server-key.pem
|
||||
ENV CRT $ETC/server.crt
|
||||
ENV KEY $ETC/server.key
|
||||
ENV TOKEN 00000000-0000-0000-0000-000000000000
|
||||
ENV PORT 6800
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y aria2 openssl \
|
||||
&& apt-get install -y aria2 \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir -p $ETC $DIR \
|
||||
&& openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $KEY -out $CERT -batch
|
||||
&& mkdir -p $ETC $DIR
|
||||
|
||||
EXPOSE $PORT
|
||||
VOLUME $DIR $ETC
|
||||
@ -27,7 +26,7 @@ CMD aria2c --disable-ipv6 \
|
||||
--rpc-listen-port=${PORT} \
|
||||
--rpc-allow-origin-all \
|
||||
--rpc-secure \
|
||||
--rpc-certificate=${CERT} \
|
||||
--rpc-certificate=${CRT} \
|
||||
--rpc-private-key=${KEY} \
|
||||
--rpc-secret=${TOKEN} \
|
||||
--dir=${DIR}
|
||||
|
@ -1,5 +1,20 @@
|
||||
`aria2` is a utility for downloading files.
|
||||
|
||||
## directory tree
|
||||
|
||||
```
|
||||
~/fig/aria2/
|
||||
├── docker-compose.yml
|
||||
├── data/
|
||||
└── keys/
|
||||
├── server.crt
|
||||
└── server.key
|
||||
```
|
||||
|
||||
> You can generate `server.key` and `server.crt` via this command:
|
||||
>> `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt`
|
||||
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```
|
||||
@ -15,10 +30,6 @@ aria2:
|
||||
restart: always
|
||||
```
|
||||
|
||||
> If you mount volume `/etc/aria2`,
|
||||
> you need to generate `server-key.pem` and `server-cert.pem` via this command:
|
||||
>> `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server-key.pem -out server-cert.pem`
|
||||
|
||||
## test
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user