2023-03-13 21:17:29 +01:00
|
|
|
FROM maven:3-amazoncorretto-8 AS builder-ms3
|
2023-03-13 18:36:30 +01:00
|
|
|
|
|
|
|
RUN yum install -y git
|
|
|
|
|
|
|
|
WORKDIR /build/arcturus-community
|
2023-03-13 21:17:29 +01:00
|
|
|
RUN git clone --branch dev --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
|
2023-10-23 23:58:53 +02:00
|
|
|
# explicit pin this version
|
|
|
|
RUN git checkout f051d1d1
|
2023-03-13 18:36:30 +01:00
|
|
|
RUN mvn package
|
|
|
|
RUN mvn install
|
|
|
|
|
|
|
|
WORKDIR /build/arcturus-ws
|
|
|
|
RUN git clone --recurse-submodules https://git.krews.org/nitro/ms-websockets.git .
|
|
|
|
RUN sed -i 's#<version>3.0.0</version>#<version>[1.0.0,)</version>#g' pom.xml
|
|
|
|
RUN mvn package
|
|
|
|
RUN cp target/NitroWebsockets-*.jar target/websockets.jar
|
|
|
|
|
|
|
|
|
2023-03-13 21:17:29 +01:00
|
|
|
|
|
|
|
FROM maven:3-amazoncorretto-19 AS builder-ms4
|
|
|
|
|
|
|
|
ARG BRANCH=ms4/dev
|
2023-10-23 23:58:53 +02:00
|
|
|
ARG COMMIT=3bb8ce16
|
2023-03-13 21:17:29 +01:00
|
|
|
|
|
|
|
RUN yum install -y git
|
|
|
|
|
|
|
|
WORKDIR /build/arcturus-community
|
|
|
|
RUN git clone --branch ${BRANCH} --recurse-submodules https://git.krews.org/morningstar/Arcturus-Community.git .
|
2023-10-23 23:58:53 +02:00
|
|
|
RUN git checkout $COMMIT
|
2023-03-13 21:17:29 +01:00
|
|
|
RUN sed -i 's#Scanner scanner = new Scanner(System.in);##g' src/main/java/com/eu/habbo/Emulator.java
|
|
|
|
RUN sed -i 's#scanner.nextLine();##g' src/main/java/com/eu/habbo/Emulator.java
|
2023-10-23 23:58:53 +02:00
|
|
|
ADD patches/ /build/arcturus-community/patches/
|
|
|
|
RUN find "$(readlink -f patches/)" -type f -name "*.patch" | xargs -I {} sh -c 'echo "Applying {}"; git apply {}'
|
2023-03-13 21:17:29 +01:00
|
|
|
RUN mvn package
|
2023-03-14 00:14:05 +01:00
|
|
|
RUN mvn install
|
2023-03-13 21:17:29 +01:00
|
|
|
RUN cp target/Morningstar*-with-dependencies.jar target/emulator.jar
|
|
|
|
|
|
|
|
|
2023-03-14 00:14:05 +01:00
|
|
|
WORKDIR /build/apollyon
|
|
|
|
RUN git clone --recurse-submodules https://git.gurkengewuerz.de/nitro/apollyon-ms4.git .
|
|
|
|
RUN sed -i 's#<version>4.0-DEVPREVIEW</version>#<version>[1.0.0,)</version>#g' pom.xml
|
|
|
|
RUN mvn package
|
|
|
|
RUN cp target/Apollyon-*.jar target/apollyon.jar
|
|
|
|
|
|
|
|
|
2023-03-13 21:17:29 +01:00
|
|
|
|
|
|
|
FROM amazoncorretto:19-alpine
|
2023-03-13 18:36:30 +01:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN apk add --no-cache mariadb-client bash
|
|
|
|
|
2023-03-13 21:17:29 +01:00
|
|
|
COPY --from=builder-ms4 /build/arcturus-community/target/emulator.jar /app/emulator.jar
|
2023-03-13 18:36:30 +01:00
|
|
|
RUN mkdir -p /app/plugins
|
2023-03-13 21:17:29 +01:00
|
|
|
COPY --from=builder-ms3 /build/arcturus-ws/target/websockets.jar /app/plugins/websockets.jar
|
2023-03-14 00:14:05 +01:00
|
|
|
COPY --from=builder-ms4 /build/apollyon/target/apollyon.jar /app/plugins/apollyon.jar
|
2023-03-13 18:36:30 +01:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/java", "-jar", "/app/emulator.jar"]
|