From 4cf11336cfc9e9bee9c9a5612eb9a2923169ea07 Mon Sep 17 00:00:00 2001 From: Thijmen Date: Tue, 19 Jan 2021 06:12:51 -0500 Subject: [PATCH] Add Docker support --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a4cda773 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM maven:latest AS builder + +# Copy the Emulator sources to the container +COPY . . +# Package it +RUN mvn package && mv /target/Habbo*-with-dependencies.jar /target/Habbo.jar + +# Use Java 8 for running +FROM java:8 AS runner + +# Copy the generated source +COPY --from=builder /target/Habbo.jar / + +# Save the script to wait for the database, among running the Arcturus Emulator +RUN echo "#!/bin/bash \n java -jar /Habbo.jar" > /entrypoint.sh +RUN chmod +x /entrypoint.sh + +# Run the Emulator with Java +ENTRYPOINT ["/entrypoint.sh"]