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

35 lines
883 B
Docker
Raw Normal View History

2015-06-10 16:30:49 +02:00
#
# Dockerfile for aria2
#
FROM debian:jessie
MAINTAINER kev <noreply@datageek.info>
ENV DIR /var/lib/aria2
ENV ETC /etc/aria2
2015-06-10 16:59:31 +02:00
ENV CERT $ETC/server-cert.pem
ENV KEY $ETC/server-key.pem
2015-06-10 16:30:49 +02:00
ENV TOKEN 00000000-0000-0000-0000-000000000000
ENV PORT 6800
RUN apt-get update \
&& apt-get install -y aria2 openssl \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p $ETC $DIR \
2015-06-10 16:54:14 +02:00
&& openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $KEY -out $CERT -batch
2015-06-10 16:30:49 +02:00
EXPOSE $PORT
VOLUME $DIR $ETC
CMD aria2c --disable-ipv6 \
--enable-rpc \
--rpc-listen-all=false \
--rpc-listen-port=${PORT} \
--rpc-allow-origin-all \
--rpc-secure \
--rpc-certificate=${CERT} \
--rpc-private-key=${KEY} \
--rpc-secret=${TOKEN} \
--dir=${DIR}