https://github.com/IITC-College/docker-java-app-distorless

Project Structure

.
├── src/
│   └── Main.java
└── Dockerfile

The application listens on port 3000.


Step 1 — Verify the Environment

Verify:

Do not modify the Java code.


Step 2 — Create the Dockerfile

Create a new file named Dockerfile

Open it in your editor.


Step 3 — Create the Build Stage

The first stage is responsible for compiling the Java application.

Use: