hb/packages/emulator/Dockerfile

23 lines
633 B
Docker
Executable File

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 adoptopenjdk/openjdk8:debian-slim AS runner
RUN mkdir /app
# Copy the generated source
COPY --from=builder /target/Habbo.jar /app/server.jar
WORKDIR /app
# Save the script to wait for the database, among running the Arcturus Emulator
RUN echo "#!/bin/bash \n java -Dfile.encoding=UTF-8 -jar /app/server.jar" > /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Run the Emulator with Java
ENTRYPOINT ["/app/entrypoint.sh"]