2023-01-30 17:04:36 +01:00
|
|
|
FROM maven:3-eclipse-temurin-19 AS builder
|
2021-01-19 12:12:51 +01:00
|
|
|
|
|
|
|
# Copy the Emulator sources to the container
|
|
|
|
COPY . .
|
|
|
|
# Package it
|
2022-12-24 16:22:01 +01:00
|
|
|
RUN mvn package && mv /target/Morningstar*-with-dependencies.jar /target/Morningstar.jar
|
2021-01-19 12:12:51 +01:00
|
|
|
|
2023-01-17 21:40:17 +01:00
|
|
|
# Use Java 19 for running
|
|
|
|
FROM eclipse-temurin:19 AS runner
|
2021-01-19 12:12:51 +01:00
|
|
|
|
|
|
|
# Copy the generated source
|
2022-12-24 16:22:01 +01:00
|
|
|
COPY --from=builder /target/Morningstar.jar /
|
2021-01-19 12:12:51 +01:00
|
|
|
|
|
|
|
# Save the script to wait for the database, among running the Arcturus Emulator
|
2022-12-24 16:22:01 +01:00
|
|
|
RUN echo "#!/bin/bash \n java -Dfile.encoding=UTF-8 -jar /Morningstar.jar" > /entrypoint.sh
|
2021-01-19 12:12:51 +01:00
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
|
|
|
|
# Run the Emulator with Java
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|