forked from hapifhir/hapi-fhir-jpaserver-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #52 from metriport/626-fix-cicd
626 Reenable CICD for FHIR Server
- Loading branch information
Showing
7 changed files
with
67 additions
and
28 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
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
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
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,29 @@ | ||
FROM --platform=linux/arm64/v8 maven:3.9-eclipse-temurin-17 as build-fhir | ||
WORKDIR /tmp/hapi-fhir-jpaserver-starter | ||
|
||
ARG OPENTELEMETRY_JAVA_AGENT_VERSION=1.17.0 | ||
RUN curl -LSsO https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OPENTELEMETRY_JAVA_AGENT_VERSION}/opentelemetry-javaagent.jar | ||
|
||
COPY pom.xml . | ||
COPY server.xml . | ||
RUN mvn -ntp dependency:go-offline | ||
|
||
COPY src/ ./src/ | ||
RUN mvn clean install -DskipTests -Djdk.lang.Process.launchMechanism=vfork | ||
|
||
FROM build-fhir AS build-distroless | ||
RUN mvn package spring-boot:repackage -Pboot | ||
RUN mkdir /app && cp ./target/ROOT.war /app/main.war | ||
|
||
########### distroless brings focus on security and runs on plain spring boot - this is the default image | ||
FROM gcr.io/distroless/java17-debian11:nonroot as default | ||
# 65532 is the nonroot user's uid | ||
# used here instead of the name to allow Kubernetes to easily detect that the container | ||
# is running as a non-root (uid != 0) user. | ||
USER 65532:65532 | ||
WORKDIR /app | ||
|
||
COPY --chown=nonroot:nonroot --from=build-distroless /app /app | ||
COPY --chown=nonroot:nonroot --from=build-fhir /tmp/hapi-fhir-jpaserver-starter/opentelemetry-javaagent.jar /app | ||
|
||
ENTRYPOINT ["java", "--class-path", "/app/main.war", "-Dloader.path=main.war!/WEB-INF/classes/,main.war!/WEB-INF/,/app/extra-classes", "org.springframework.boot.loader.PropertiesLauncher", "app/main.war"] |
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
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