Repository: XUJINKAI/aria2-with-webui Branch: master Commit: 1fefc07d66a2 Files: 5 Total size: 2.5 KB Directory structure: gitextract_fx61xh3a/ ├── Dockerfile ├── README.md └── files/ ├── aria2.conf ├── on-complete.sh └── start.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: Dockerfile ================================================ FROM alpine:edge MAINTAINER xujinkai RUN apk update && \ apk add --no-cache --update bash && \ mkdir -p /conf && \ mkdir -p /conf-copy && \ mkdir -p /data && \ apk add --no-cache --update aria2 && \ apk add git && \ git clone https://github.com/ziahamza/webui-aria2 /aria2-webui && \ rm /aria2-webui/.git* -rf && \ apk del git && \ apk add --update darkhttpd ADD files/start.sh /conf-copy/start.sh ADD files/aria2.conf /conf-copy/aria2.conf ADD files/on-complete.sh /conf-copy/on-complete.sh RUN chmod +x /conf-copy/start.sh WORKDIR / VOLUME ["/data"] VOLUME ["/conf"] EXPOSE 6800 EXPOSE 80 EXPOSE 8080 CMD ["/conf-copy/start.sh"] ================================================ FILE: README.md ================================================ # 此项目无限期停止维护。NO LONGER SUPPORT。 Pleases Fork this project and modify for yourself. --- Aria2 with webui --- Only 29Mb. Edit config file out of the image. Move file completed to another folder. (Tasks that contains more than one files will not be moved.) ### Install I. replace **/DOWNLOAD_DIR** and **/CONFIG_DIR** for save data, and **YOUR_SECRET_CODE** for security. Run command below ``` sudo docker run -d \ --name aria2-with-webui \ -p 6800:6800 \ -p 6880:80 \ -p 6888:8080 \ -v /DOWNLOAD_DIR:/data \ -v /CONFIG_DIR:/conf \ -e SECRET=YOUR_SECRET_CODE \ xujinkai/aria2-with-webui ``` II. Open `http://serverip:6880/` for aria2-webui, open `http://serverip:6888/` to browse data folder. ### Build: `sudo docker build -f Dockerfile -t xujinkai/aria2-with-webui .` ### Link: https://github.com/aria2/aria2 https://github.com/ziahamza/webui-aria2 https://github.com/acgotaku/BaiduExporter ================================================ FILE: files/aria2.conf ================================================ dir=/data/_dl on-download-complete=/conf/on-complete.sh input-file=/conf/aria2.session save-session=/conf/aria2.session file-allocation=falloc log-level=warn enable-http-pipelining=true max-concurrent-downloads=3 max-connection-per-server=10 min-split-size=10M split=10 continue=true max-overall-download-limit=0 max-overall-upload-limit=1K bt-detach-seed-only=true seed-ratio=1.0 seed-time=0 enable-rpc=true rpc-listen-all=true rpc-allow-origin-all=true rpc-listen-port=6800 ================================================ FILE: files/on-complete.sh ================================================ #!/bin/sh if [ $2 -eq 1 ]; then mv "$3" /data fi echo [$(date)] $2, $3, $1 "
" >> /data/_log.html ================================================ FILE: files/start.sh ================================================ #!/bin/sh if [ ! -f /conf/aria2.conf ]; then cp /conf-copy/aria2.conf /conf/aria2.conf if [ $SECRET ]; then echo "rpc-secret=${SECRET}" >> /conf/aria2.conf fi fi if [ ! -f /conf/on-complete.sh ]; then cp /conf-copy/on-complete.sh /conf/on-complete.sh fi chmod +x /conf/on-complete.sh touch /conf/aria2.session darkhttpd /aria2-webui/docs --port 80 & darkhttpd /data --port 8080 & aria2c --conf-path=/conf/aria2.conf