All checks were successful
Build, test and publish / verify (push) Successful in 8m54s
30 lines
1.2 KiB
Docker
30 lines
1.2 KiB
Docker
FROM maven:3.9-eclipse-temurin-25 AS build
|
|
WORKDIR /workspace
|
|
COPY pom.xml ./
|
|
COPY .mvn .mvn
|
|
COPY generated generated
|
|
COPY tooling tooling
|
|
COPY engineering.properties engineering.properties
|
|
COPY agiledancers-be/pom.xml agiledancers-be/pom.xml
|
|
COPY agiledancers-be/src agiledancers-be/src
|
|
# Source builds run the same PostgreSQL tests as local/CI verification.
|
|
# Supply connection configuration as BuildKit secrets, which are not retained in image layers.
|
|
RUN --mount=type=secret,id=database_url,env=QUARKUS_DATASOURCE_JDBC_URL,required=true \
|
|
--mount=type=secret,id=database_user,env=QUARKUS_DATASOURCE_USERNAME,required=true \
|
|
--mount=type=secret,id=database_password,env=QUARKUS_DATASOURCE_PASSWORD,required=true \
|
|
mvn -B -ntp clean verify
|
|
|
|
FROM eclipse-temurin:25-jre AS runtime
|
|
WORKDIR /app
|
|
USER 10001:10001
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["java", "-jar", "/app/quarkus-run.jar"]
|
|
|
|
# CI packages the exact output that already passed mvn clean verify.
|
|
FROM runtime AS prebuilt
|
|
COPY --chown=10001:10001 agiledancers-be/target/quarkus-app/ ./
|
|
|
|
# Default standalone build still compiles and tests from source.
|
|
FROM runtime AS standalone
|
|
COPY --from=build --chown=10001:10001 /workspace/agiledancers-be/target/quarkus-app/ ./
|