-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from rishiraj88/develop
Update Dockerfile and docker-compose.yml for Product.
- Loading branch information
Showing
3 changed files
with
25 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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,24 @@ | ||
# Build | ||
# /~https://github.com/carlossg/docker-maven/blob/8cfe24baffa5b250f7bb2d31ce233fc28f3c4f20/amazoncorretto-21/Dockerfile | ||
FROM maven:3.9.9-amazoncorretto-21-alpine AS build | ||
WORKDIR /app | ||
COPY ./src . | ||
COPY ./pom.xml . | ||
RUN mvn clean package | ||
|
||
# Deploy | ||
FROM amazoncorretto:8-alpine3.21-jre AS deploy | ||
WORKDIR /app | ||
RUN mkdir target | ||
|
||
LABEL maintainer="Rishi Raj" | ||
LABEL version="1.0" | ||
LABEL description="Dockerfile for Order-Manager::Product with JDK 21 and MongoDB" | ||
|
||
COPY --from=build /app/target/product-0.0.1-SNAPSHOT.jar /app/target/ | ||
EXPOSE 8080 | ||
#ENTRYPOINT [ "java", "-jar","target/product-0.0.1-SNAPSHOT.jar" ] | ||
CMD [ "java", "-jar","target/product-0.0.1-SNAPSHOT.jar" ] | ||
|
||
|
||
VOLUME ./data:/data/db |
This file was deleted.
Oops, something went wrong.
This file contains 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