在ubuntu14.04上漏洞环境vulndocker的DOCKER搭建

一、下载git包以及安装:

 1 git clone https://github.com/leveryd/vulndocker.git
 2 cd vulndocker
 3 apt-get install uwsgi-plugin-python docker.io nginx-core
 4 pip install -r requirements.txt
 5 cp nginx.conf /etc/nginx/sites-enabled/default
 6 vim Dockerfile
 7 #推荐使用[阿里云docker加速器](https://yq.aliyun.com/articles/29941)  (下载镜像快)
 8 #懒得创建用户可以使用我的镜像地址:https://l0fso5am.mirror.aliyuncs.com
 9 setsid python compile.py &
10 sh ./run.sh

二、运行:

 1 #平台需要redis服务
 2 docker run -d -p 6379:6379 redis:latest
 3 
 4 #启动
 5 cd vulndocker/
 6 
 7 #修改app.py中的ip和port
 8 ip = "127.0.0.1"    #本机ip
 9 webport = 80      #web端口
10 ttyport = 9999      #在线docker端口
11 
12 #启动
13 uwsgi_python --socket 127.0.0.1:3031 --wsgi-file app.py --callable app --processes 4 --threads 2 --stats 127.0.0.1:9191 &
14 
15 #启动web页面的ssh
16 #原项目:https://github.com/JetMuffin/dockertty
17 cd dockertty/dockertty
18 nohup python server.py -p 9999 &
19 
20 #添加计划任务
21 */2 * * * * python /root/vulndocker/crontab.py

三、停止:

1 ps -ef|grep uwsgi|grep -v grep|awk '{print $2}'|xargs kill -9

四、参考:https://github.com/leveryd/vulndocker(鸣谢)

原文地址:https://www.cnblogs.com/KevinGeorge/p/8264746.html