Skip to content

Commit 1c33746

Browse files
committed
JavaVulnerableLab dockerized option.
1 parent 89a9159 commit 1c33746

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM tomcat
2+
3+
COPY . .
4+
5+
RUN apt-get update ; apt-get install maven default-jdk -y ; update-alternatives --config javac
6+
7+
RUN mvn clean package ; cp target/*.war /usr/local/tomcat/webapps/
8+
9+
CMD ["catalina.sh","run"]

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,19 @@ https://www.udemy.com/hacking-securing-java-web-programming/
1111
How to Use/Setup ?
1212
-------------
1313

14-
**Method 1.Very Easiest Method : VirtualBox VM**
15-
The Most easiest way to use Java Vulnerable is using the VirtualBox VM which has everything set up and ready to use.
14+
**Method 1.Super Very Easiest Method: Docker**
15+
The easiest way to use Java Vulnerable is using Docker wich set up everything for you with 1 command line
16+
17+
Steps:
18+
1. Install [Docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/).
19+
2. Inside this directory, run `sudo docker-compose up` and wait untill everything is configured for you.
20+
3. In your Browser, go to "http://localhost:8080/JavaVulnerableLab/install.jsp
21+
4. Click the Install Button
22+
5. Enjoy :)
23+
24+
25+
**Method 2.Very Easiest Method : VirtualBox VM**
26+
The second most easiest way to use Java Vulnerable is using the VirtualBox VM which has everything set up and ready to use.
1627

1728
Steps:
1829

@@ -28,7 +39,7 @@ How to Use/Setup ?
2839
10. Click the Install Button
2940
11. Enjoy :)
3041

31-
**Method 2.Easiest Method : Standalone Web Application**
42+
**Method 3.Easiest Method : Standalone Web Application**
3243
In this mehtod, you will be running an executable "JAR" file which runs the application with an embedded Apache Tomcat.
3344

3445
Steps:
@@ -39,7 +50,7 @@ How to Use/Setup ?
3950
4. In your Browser, go to "http://localhost:8080/JavaVulnerableLab/install.jsp
4051
5. Click the Install Button
4152
42-
**Method 3. Using War file:**
53+
**Method 4. Using War file:**
4354
This is a NORMAL method to deploy the WAR file.
4455

4556
Steps:

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
javavulnlab:
2+
build: .
3+
ports:
4+
- 8080:8080
5+
net: host
6+
7+
mysql:
8+
image: mysql
9+
environment:
10+
- MYSQL_ROOT_PASSWORD=root
11+
net: host
12+
ports:
13+
- 3306:3306

0 commit comments

Comments
 (0)