From 004fbacd989bcb745d4cf7387a580702190b76fc Mon Sep 17 00:00:00 2001 From: Cyber Security and Privacy Foundation Date: Thu, 20 Jun 2024 12:12:51 +0530 Subject: [PATCH 1/3] docker-fix --- default-tomcat.xml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 default-tomcat.xml diff --git a/default-tomcat.xml b/default-tomcat.xml new file mode 100644 index 00000000..a225d5e4 --- /dev/null +++ b/default-tomcat.xml @@ -0,0 +1,6 @@ + + + + + + From f96f204bc2546f3a7568da24f6215cf6d4387112 Mon Sep 17 00:00:00 2001 From: Cyber Security and Privacy Foundation Date: Thu, 20 Jun 2024 12:13:30 +0530 Subject: [PATCH 2/3] docker-compose-update --- Dockerfile | 23 +++++++++++++++++++---- docker-compose.yml | 29 +++++++++++++++++++---------- pom.xml | 4 ++++ 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb80dcf7..6597db0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,24 @@ -FROM tomcat +# Stage 1: Build Stage +FROM openjdk:8 as build +WORKDIR /app + +# Copy the source code into the Docker image COPY . . -RUN apt-get update ; apt-get install maven default-jdk -y ; update-alternatives --config javac +# Install Maven and JDK, then build the project +RUN apt-get update && \ + apt-get install -y maven && \ + mvn clean package + +# Stage 2: Runtime Stage +FROM tomcat:7.0.82 + +# Copy the WAR file built in the previous stage +COPY --from=build /app/target/*.war /usr/local/tomcat/webapps/ -RUN mvn clean package ; cp target/*.war /usr/local/tomcat/webapps/ +# Copy the pre-prepared tomcat-users.xml to set up user roles +COPY default-tomcat.xml /usr/local/tomcat/conf/tomcat-users.xml -CMD ["catalina.sh","run"] +# CMD to start Tomcat +CMD ["catalina.sh", "run"] diff --git a/docker-compose.yml b/docker-compose.yml index 672bcaca..23d7f3a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,20 @@ -javavulnlab: - build: . - ports: - - 8080:8080 - links: - - mysql -mysql: - image: mysql - environment: - - MYSQL_ROOT_PASSWORD=root +services: + jvl: + image: cspf/jvl + build: + dockerfile: ./Dockerfile + context: ./ + ports: + - 8080:8080 + links: + - mysql + + mysql: + image: mysql:5.7 + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_ROOT_HOST: "%" + MYSQL_DATABASE: abc + command: + - "--default-authentication-plugin=mysql_native_password" diff --git a/pom.xml b/pom.xml index e90d5213..0cdcea36 100644 --- a/pom.xml +++ b/pom.xml @@ -44,4 +44,8 @@ JavaVulnerableLab + + 1.7 + 1.7 + From ae743f6886e022b4b6b0bafcff3a60ae34d219b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 11:21:53 +0000 Subject: [PATCH 3/3] Bump org.json:json in the maven group across 1 directory Bumps the maven group with 1 update in the / directory: [org.json:json](https://github.com/douglascrockford/JSON-java). Updates `org.json:json` from 20090211 to 20231013 - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-version: '20231013' dependency-type: direct:production dependency-group: maven ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0cdcea36..83e8cb7c 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.json json - 20090211 + 20231013 javax.servlet