在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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值