Skip to content

Commit

Permalink
Merge pull request #676 from egovernments/HLM-5143-dockerfile
Browse files Browse the repository at this point in the history
HLM-5143 adding different Dockerfile for Java 17
  • Loading branch information
shashwat-egov authored Mar 13, 2024
2 parents 0b1ea32 + 15c87e8 commit 4950875
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions build/17/maven/Dockerfile
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"]
2 changes: 1 addition & 1 deletion build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,6 @@ config:
build:
- work-dir: "health-services/plan-service"
image-name: "plan-service"
dockerfile: "build/maven/Dockerfile"
dockerfile: "build/17/maven/Dockerfile"
- work-dir: "health-services/plan-service/src/main/resources/db"
image-name: "plan-service-db"

0 comments on commit 4950875

Please sign in to comment.