Add Docker support

This commit is contained in:
Thijmen 2021-01-19 06:12:51 -05:00 committed by Harmonic
parent d8fbc3d0c3
commit 4cf11336cf

19
Dockerfile Normal file
View File

@ -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"]