Arcturus-Community/Dockerfile

20 lines
578 B
Docker
Raw Normal View History

2021-01-19 12:12:51 +01:00
FROM maven:latest AS builder
# Copy the Emulator sources to the container
COPY . .
# Package it
RUN mvn package && mv /target/Morningstar*-with-dependencies.jar /target/Morningstar.jar
2021-01-19 12:12:51 +01:00
# Use openjdk 11 for running
FROM openjdk:11 AS runner
2021-01-19 12:12:51 +01:00
# Copy the generated source
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
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"]