2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2026-01-03 19:44:58 +01:00
This commit is contained in:
kev
2015-06-11 00:19:01 +08:00
parent 75f705dd7c
commit 5d502b94e0
2 changed files with 20 additions and 10 deletions

View File

@@ -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}