[go: up one dir, main page]

0% found this document useful (0 votes)
22 views1 page

Docker File

This document outlines a Dockerfile for building a Java application using OpenJDK 17. It specifies a multi-stage build process where the application is compiled and packaged before being copied to a final image. The application is then set to run with an entry point and exposes port 8080.

Uploaded by

prajakta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Docker File

This document outlines a Dockerfile for building a Java application using OpenJDK 17. It specifies a multi-stage build process where the application is compiled and packaged before being copied to a final image. The application is then set to run with an entry point and exposes port 8080.

Uploaded by

prajakta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

FROM openjdk:17-jdk-slim AS build

WORKDIR /app
COPY pom.xml ./
COPY src ./src
COPY mvnw ./
COPY .mvn ./.mvn
RUN chmod +x ./mvnw
RUN ./mvnw clean package -DskipTests
FROM openjdk:17-jdk-slim
COPY --from=build /app/target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
EXPOSE 8080

You might also like