FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Sathish210598 patch 1 by sathish210598 · Pull Request #30 · chrishantha/sample-java-programs · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .toml  (1) No extension  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
23 changes: 23 additions & 0 deletions DOCKER
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ====== Build Stage ======
FROM maven:3.9.4-eclipse-temurin-17 AS build

# Set workdir
WORKDIR /app

# Copy pom.xml and download dependencies (caches better)
COPY pom.xml .
RUN mvn dependency:go-offline -B

# Copy source and build
COPY src ./src
RUN mvn clean package -DskipTests

# ====== Run Stage ======
FROM eclipse-temurin:17-jdk-alpine

WORKDIR /app
# Copy only the built jar from previous stage
COPY --from=build /app/target/*.jar app.jar

# Run the app
ENTRYPOINT ["java", "-jar", "app.jar"]
Loading

Back | FazBrowse Home | New Git URL