├── Dockerfile ├── README.md ├── run.sh ├── start.sh └── thunder └── bin ├── lib ├── ETMDaemon ├── EmbedThunderManager └── vod_httpserver └── portal /Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerizing thunder xware 2 | # xware version: Xware1.0.31 release date: 2014-08-27 3 | 4 | FROM ubuntu:14.10 5 | MAINTAINER yinheli 6 | 7 | RUN /bin/sed -i.bak 's/archive/cn\.archive/' /etc/apt/sources.list 8 | RUN rm /bin/sh && ln -s /bin/bash /bin/sh && \ 9 | apt-get update && apt-get install -y zlib1g-dev lib32z1 lib32ncurses5 && \ 10 | apt-get clean && \ 11 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ 12 | mkdir -p /app/bin 13 | 14 | COPY thunder /app/ 15 | COPY start.sh /app/ 16 | VOLUME /app/TDDOWNLOAD 17 | 18 | WORKDIR /app 19 | RUN chmod +x start.sh && chmod +x ./bin/portal 20 | CMD ["./start.sh"] 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dockerizing thunder xware 2 | 3 | 迅雷离线下载 docker 镜像, 随便一台能上网的服务器都能成为下载利器哦~ 4 | 5 | 再也不用担心迅雷扫描你的整块磁盘了. 6 | 7 | 8 | ## 使用 9 | 10 | ### 拉取镜像 11 | 12 | ``` 13 | docker pull yinheli/docker-thunder-xware:latest 14 | ``` 15 | 16 | ### 创建一个下载目录. 用于挂载卷 17 | 18 | ``` 19 | mkdir data 20 | ``` 21 | 22 | ### 运行 23 | 24 | ``` 25 | docker run -d \ 26 | --name=xware \ 27 | --net=host \ 28 | -v $(pwd)/data:/app/TDDOWNLOAD \ 29 | yinheli/docker-thunder-xware 30 | ``` 31 | 32 | ### 查看运行情况 33 | 34 | ``` 35 | docker ps 36 | ``` 37 | 38 | ``` 39 | // output: 40 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 41 | c8a3d047af71 yinheli/docker-thunder-xware:latest "./start.sh" 4 seconds ago Up 3 seconds xware 42 | ``` 43 | 44 | ### 查看日志(激活码)/到迅雷增加设备 45 | 46 | ``` 47 | docker logs xware 48 | ``` 49 | 50 | ``` 51 | // output: 52 | killall: ETMDaemon: no process killed 53 | killall: EmbedThunderManager: no process killed 54 | killall: vod_httpserver: no process killed 55 | initing... 56 | try stopping xunlei service first... 57 | setting xunlei runtime env... 58 | port: 9000 is usable. 59 | 60 | YOUR CONTROL PORT IS: 9000 61 | 62 | starting xunlei service... 63 | Connecting to 127.0.0.1:9000 (127.0.0.1:9000) 64 | setting xunlei runtime env... 65 | port: 9000 is usable. 66 | 67 | YOUR CONTROL PORT IS: 9000 68 | 69 | starting xunlei service... 70 | 71 | getting xunlei service info... 72 | 73 | THE ACTIVE CODE IS: xxx 74 | 75 | go to http://yuancheng.xunlei.com, bind your device with the active code. 76 | finished. 77 | ``` 78 | 79 | 绑定成功后就可以开心地使用了. 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | if [ ! -d data ]; then 2 | mkdir -p data 3 | fi 4 | 5 | docker run -d \ 6 | --name=xware \ 7 | -v $(pwd)/data:/app/TDDOWNLOAD \ 8 | yinheli/docker-thunder-xware:latest 9 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | while true; do 5 | pid=`ps -ef|grep vod_httpserver|grep -v grep|awk '{print $2}'` 6 | if [ -z "$pid" ]; then 7 | ./bin/portal 8 | else 9 | sleep 60 10 | fi 11 | done 12 | 13 | -------------------------------------------------------------------------------- /thunder/bin/lib/ETMDaemon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinheli/docker-thunder-xware/914506aa5894577596be2dbd61c5c92d55dbc4f8/thunder/bin/lib/ETMDaemon -------------------------------------------------------------------------------- /thunder/bin/lib/EmbedThunderManager: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinheli/docker-thunder-xware/914506aa5894577596be2dbd61c5c92d55dbc4f8/thunder/bin/lib/EmbedThunderManager -------------------------------------------------------------------------------- /thunder/bin/lib/vod_httpserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinheli/docker-thunder-xware/914506aa5894577596be2dbd61c5c92d55dbc4f8/thunder/bin/lib/vod_httpserver -------------------------------------------------------------------------------- /thunder/bin/portal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinheli/docker-thunder-xware/914506aa5894577596be2dbd61c5c92d55dbc4f8/thunder/bin/portal --------------------------------------------------------------------------------