+ Dockerfile and doc

This commit is contained in:
Luigi Maselli 2015-04-28 18:14:16 +02:00
parent e2176862ee
commit bd02b50baf
2 changed files with 47 additions and 0 deletions

29
Dockerfile Normal file
View File

@ -0,0 +1,29 @@
FROM debian:8
# less priviledge user, the id should map the user the downloaded files belongs to
RUN groupadd -r dummy && useradd -r -g dummy dummy -u 1000
# webui + aria2
RUN apt-get update \
&& apt-get install -y aria2 busybox curl \
&& rm -rf /var/lib/apt/lists/*
ADD . /webui-aria2
# gosu install latest
RUN GITHUB_REPO="https://github.com/tianon/gosu" \
&& LATEST=`curl -s $GITHUB_REPO"/releases/latest" | grep -Eo "[0-9].[0-9]"` \
&& curl -L $GITHUB_REPO"/releases/download/"$LATEST"/gosu-amd64" > /usr/local/bin/gosu \
&& chmod +x /usr/local/bin/gosu
# goreman supervisor install latest
RUN GITHUB_REPO="https://github.com/mattn/goreman" \
&& LATEST=`curl -s $GITHUB_REPO"/releases/latest" | grep -Eo "v[0-9]*.[0-9]*.[0-9]*"` \
&& curl -L $GITHUB_REPO"/releases/download/"$LATEST"/goreman_linux_amd64.tar.gz" > goreman.tar.gz \
&& tar -xvzf goreman.tar.gz && mv /goreman_linux_amd64/goreman /usr/local/bin/goreman && rm -R goreman*
# goreman setup
RUN echo -e "web: gosu dummy /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu dummy /usr/bin/aria2c --enable-rpc --rpc-listen-all --dir=/data" > Procfile
EXPOSE 8080 6800
CMD ["goreman", "start"]

View File

@ -27,6 +27,24 @@ Dependencies
============
Well, you need aria2. And a web browser (if that even counts!)
Docker support
==============
You can also try or use webui-aria2 in your LAN inside a Docker sandbox.
Build the image
````bash
sudo docker build -t yourname/webui-aria2 .
````
..and run it! It will be available at: `http://localhost:9100`
````bash
sudo docker run -v /Downloads:/data -p 6800:6800 -p 9100:8080 --name="webui-aria2" yourname/webui-aria2
````
`/Downloads` is the directory in the host where you want to keep the downloaded files
Support
=======
For any support, feature request and bug report add an issue in the github project. [link](https://github.com/ziahamza/webui-aria2/issues)