From 66258afe1c755aa91cd3652e24de42ac4f130de5 Mon Sep 17 00:00:00 2001 From: kev Date: Sat, 11 Jun 2016 08:15:37 +0800 Subject: [PATCH] add webgoat --- README.md | 1 + jenkins/README.md | 5 ++++- webgoat/Dockerfile | 22 ++++++++++++++++++++++ webgoat/README.md | 25 +++++++++++++++++++++++++ webgoat/docker-compose.yml | 5 +++++ 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 webgoat/Dockerfile create mode 100644 webgoat/README.md create mode 100644 webgoat/docker-compose.yml diff --git a/README.md b/README.md index be18048..8ecb4d6 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ A collection of delicious docker recipes. - [x] tor - [x] urlwatch :beetle: - [x] vsftpd +- [x] webgoat - [x] webhook - [x] webkit :beetle: - [x] youtube :beetle: diff --git a/jenkins/README.md b/jenkins/README.md index 7fbef41..df0b621 100644 --- a/jenkins/README.md +++ b/jenkins/README.md @@ -28,8 +28,11 @@ $ mkdir -p data $ sudo chown 1000 data $ docker-compose up -d $ docker-compose exec jenkins bash ->>> cat secrets/initialAdminPassword +>>> cat ~/secrets/initialAdminPassword +****** >>> ssh-keygen +>>> cat ~/.ssh/id_rsa.pub +...... >>> exit $ docker-compose exec --user root jenkins apk add -U git $ firefox http://localhost:8080/ diff --git a/webgoat/Dockerfile b/webgoat/Dockerfile new file mode 100644 index 0000000..ad97617 --- /dev/null +++ b/webgoat/Dockerfile @@ -0,0 +1,22 @@ +# +# Dockerfile for webgoat +# + +FROM java:jre-alpine +MAINTAINER kev + +ENV WEBGOAT_VERSION 7.0.1 +ENV WEBGOAT_FILE webgoat-container-$WEBGOAT_VERSION-war-exec.jar +ENV WEBGOAT_URL https://github.com/WebGoat/WebGoat/releases/download/$WEBGOAT_VERSION/$WEBGOAT_FILE + +WORKDIR /app + +RUN set -xe \ + && apk add -U curl \ + && curl -sSL $WEBGOAT_URL > webgoat.jar \ + && apk del curl \ + && rm -rf /var/cache/apk/* + +EXPOSE 8080 + +CMD ["java", "-jar", "webgoat.jar"] diff --git a/webgoat/README.md b/webgoat/README.md new file mode 100644 index 0000000..e47689a --- /dev/null +++ b/webgoat/README.md @@ -0,0 +1,25 @@ +webgoat +======= + +![](https://badge.imagelayers.io/vimagick/webgoat:latest.svg) + +[WebGoat][1] is a deliberately insecure Web Application. + +### docker-compose.yml + +```yaml +webgoat: + image: vimagick/webgoat + ports: + - "8080:8080" + restart: always +``` + +### up and running + +```bash +docker-compose up -d +firefox http://localhost:8080/WebGoat/ +``` + +[1]: https://github.com/WebGoat/WebGoat diff --git a/webgoat/docker-compose.yml b/webgoat/docker-compose.yml new file mode 100644 index 0000000..683ea56 --- /dev/null +++ b/webgoat/docker-compose.yml @@ -0,0 +1,5 @@ +webgoat: + image: vimagick/webgoat + ports: + - "8080:8080" + restart: always