部署docker环境:
1、leafpad /etc/apt/sources.list.d/backports.list 加入以下代码
deb http://http.debian.net/debian wheezy-backports main
2、更新
apt-get update
3、安装https方法和CA ceritificates
apt-get install apt-transport-https ca-certificates
4、添加GPG key
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
5、leafpad /etc/apt/sources.list.d/docker.list 加入以下代码
deb https://apt.dockerproject.org/repo debian-wheezy main
#On Debian Jessie
#deb https://apt.dockerproject.org/repo debian-jessie main
#On Debian Stretch/Sid
#deb https://apt.dockerproject.org/repo debian-stretch main
6、apt-get update
7、apt-cache policy docker-engine
apt-get update
apt-get install docker-engine
# 安装结束,打开docker服务
service docker start
# 验证安装,运行测试样例 docker run hello-world
# 如果没有错误就大功造成了!
安装docker-compose:
pip install docker-compose
启动:
# 拉取项目
git clone [email protected]:phith0n/vulhub.git
cd vulhub
docker-compose build
docker-compose up -d
测试完成后,删除整个环境
docker-compose down