Skip to content

Commit d4e7481

Browse files
authored
Dockerfile update (#52) (#63)
* Update Dockerfile Dockerfiles now copies www folder aswell * Added building and copying of dependency jar files * Fix dependency path in Dockerfile and update classpath in ENTRYPOINT configuration. * Fixed typo in Entrypoint configuration * Expose port 8080 in Dockerfile and changed appuser to come before ENTRYPOINT configuration. * Adjust Dockerfile paths for classes and dependencies, update `COPY` targets accordingly.
1 parent 3128ac7 commit d4e7481

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ WORKDIR /build
33
COPY src/ src/
44
COPY pom.xml pom.xml
55
RUN mvn compile
6+
RUN mvn dependency:copy-dependencies -DincludeScope=compile
67

78
FROM eclipse-temurin:25-jre-alpine
9+
EXPOSE 8080
810
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
9-
COPY --from=build /build/target/classes/ /app/
10-
ENTRYPOINT ["java", "-classpath", "/app", "org.example.App"]
11+
WORKDIR /app/
12+
COPY --from=build /build/target/classes/ /
13+
COPY --from=build /build/target/dependency/ /dependencies/
14+
COPY /www/ /www/
1115
USER appuser
16+
ENTRYPOINT ["java", "-classpath", "/app:/dependencies/*", "org.example.App"]

0 commit comments

Comments
 (0)