-
Notifications
You must be signed in to change notification settings - Fork 24
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 #676 from egovernments/HLM-5143-dockerfile
HLM-5143 adding different Dockerfile for Java 17
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
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,34 @@ | ||
|
||
FROM egovio/amazoncorretto:17-alpine3.19 AS build | ||
# FROM egovio/alpine-maven-builder-jdk-8:1-master-NA-6036091e AS build | ||
#FROM ghcr.io/egovernments/alpine-maven-builder-jdk-8:1-master-na-6036091e AS build | ||
ARG WORK_DIR | ||
WORKDIR /app | ||
|
||
# Install Maven | ||
RUN apk add --no-cache maven | ||
|
||
# copy the project files | ||
COPY ${WORK_DIR}/pom.xml ./pom.xml | ||
COPY build/maven/start.sh ./start.sh | ||
|
||
# not useful for stateless builds | ||
# RUN mvn -B dependency:go-offline | ||
|
||
COPY ${WORK_DIR}/src ./src | ||
RUN mvn -B -f /app/pom.xml package | ||
|
||
|
||
# Create runtime image | ||
#FROM egovio/8-openjdk-alpine | ||
#FROM ghcr.io/egovernments/8-openjdk-alpine:latest | ||
FROM egovio/amazoncorretto:17-alpine3.19 | ||
|
||
|
||
WORKDIR /opt/egov | ||
|
||
COPY --from=build /app/target/*.jar /app/start.sh /opt/egov/ | ||
|
||
RUN chmod +x /opt/egov/start.sh | ||
|
||
CMD ["/opt/egov/start.sh"] |
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