Skip to content

Commit 1ec3ae3

Browse files
committed
dockerfiles
1 parent 5ce93b1 commit 1ec3ae3

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

dockerfiles/webgoat.dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM amazoncorretto:21-alpine-jdk
2+
3+
COPY ./dist/webgoat-sut.jar .
4+
COPY ./dist/jacocoagent.jar .
5+
6+
7+
8+
9+
COPY ./scripts/dockerize/data/additional_files/webgoat/test.mv.db .
10+
11+
12+
13+
#ENV TOOL="undefined"
14+
#ENV RUN="0"
15+
16+
ENTRYPOINT \
17+
java \
18+
# unfortunately dumponexit is completely unreliable in Docker :(
19+
# -javaagent:jacocoagent.jar=destfile=./jacoco/webgoat__${TOOL}__${RUN}__jacoco.exec,append=false,dumponexit=true \
20+
-javaagent:jacocoagent.jar=output=tcpserver,address=*,port=6300,append=false,dumponexit=false \
21+
-jar webgoat-sut.jar \
22+
--server.port=8080 --spring.profiles.active=dev --spring.datasource.driver-class-name=org.h2.Driver --spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect --spring.jpa.properties.jakarta.persistence.schema-generation.scripts.action=none --spring.sql.init.mode=never --spring.datasource.url="jdbc:h2:file:./test" --spring.datasource.username=sa --spring.datasource.password

dockerfiles/webgoat.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
sut-webgoat:
3+
build:
4+
dockerfile: ./dockerfiles/webgoat.dockerfile
5+
context: ..
6+
# environment:
7+
# TOOL: ${TOOL:-undefined}
8+
# RUN: ${RUN:-0}
9+
ports:
10+
- "${HOST_PORT:-8080}:8080"
11+
- "${JACOCO_PORT:-6300}:6300"
12+
# volumes:
13+
# default env does not work on volumes
14+
# - ${JACOCODIR}:/jacoco
15+
40 KB
Binary file not shown.

scripts/dockerize/data/sut.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ spring-batch-rest,TRUE,"",--server.port=8080 --spring.batch.job.enabled=false --
2929
spring-rest-example,TRUE,"","--server.port=8080 --spring.datasource.username=root --spring.datasource.password=root --spring.datasource.url=""jdbc:mysql://db:3306/example?useSSL=false&allowPublicKeyRetrieval=true""",http://localhost:8080/v3/api-docs,http://localhost:8080,FALSE,mysql:8.0,3306,/var/lib/mysql,MYSQL_ROOT_PASSWORD: root;MYSQL_DATABASE: example,,FALSE,TRUE,"""CMD""; ""mysqladmin""; ""ping""; ""-h""; ""localhost"""
3030
erc20-rest-service,TRUE,"",--server.port=8080,http://localhost:8080/v2/api-docs,http://localhost:8080,FALSE,,,,,,FALSE,FALSE,
3131
spring-actuator-demo,TRUE,"",--server.port=8080,http://localhost:8080/v3/api-docs,http://localhost:8080,FALSE,,,,,,FALSE,FALSE,
32-
webgoat,TRUE,"","--server.port=8080 --spring.profiles.active=dev --spring.datasource.driver-class-name=org.h2.Driver --spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect --spring.jpa.properties.jakarta.persistence.schema-generation.scripts.action=none --spring.sql.init.mode=never --spring.datasource.url=""jdbc:h2:mem:testdb;INIT=CREATE SCHEMA IF NOT EXISTS CONTAINER;DB_CLOSE_DELAY=-1"" --spring.datasource.username=sa --spring.datasource.password",http://localhost:8080/WebGoat/v3/api-docs,http://localhost:8080,FALSE,,,,,,FALSE,FALSE,
32+
webgoat,TRUE,"","--server.port=8080 --spring.profiles.active=dev --spring.datasource.driver-class-name=org.h2.Driver --spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect --spring.jpa.properties.jakarta.persistence.schema-generation.scripts.action=none --spring.sql.init.mode=never --spring.datasource.url=""jdbc:h2:file:./test"" --spring.datasource.username=sa --spring.datasource.password",http://localhost:8080/WebGoat/v3/api-docs,http://localhost:8080,TRUE,,,,,,FALSE,FALSE,

statistics/table_emb.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
|__ocvn__|REST|45521|526|258|Java|JDK 8|Maven|H2, MongoDB|✓|
1010
|__pay-publicapi__|REST|34576|377|10|Java|JDK 11|Maven|Redis|✓|
1111
|__genome-nexus__|REST|30004|405|23|Java|JDK 8|Maven|MongoDB||
12+
|__webgoat__|REST|27638|355|204|Java|JDK 21|Maven|H2|✓|
1213
|__tiltaksgjennomforing__|REST|27316|472|79|Java|JDK 17|Maven|PostgreSQL|✓|
1314
|__ohsome-api__|REST|14166|87|134|Java|JDK 17|Maven|OSHDB||
1415
|__market__|REST|9861|124|13|Java|JDK 11|Maven|H2|✓|

0 commit comments

Comments
 (0)