開發與維運

Centos7下Docker上部署webgoat

1.docker安裝和啟動

wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
yum install docker-ce -y
systemctl start docker
systemctl enable docker
systemctl status docker

2.配置鏡像加速器

針對Docker客戶端版本大於 1.10.0 的用戶
您可以通過修改daemon配置文件/etc/docker/daemon.json來使用加速器

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://780urbjd.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

3.下載和啟動容器
docker pull webgoat/webgoat-8.0
image.png
docker run -d -p 8082:8080 -t webgoat/webgoat-8.0
把容器內的8080端口映射到服務器的8082端口
4.打開系統web頁面(http://117.50.65.137:8082/WebGoat/login)
image.png
5.註冊賬號
image.png
6.正常使用
image.png

Leave a Reply

Your email address will not be published. Required fields are marked *