Skip to content

Commit 5b6d871

Browse files
authored
Install Git and update build commands in Dockerfile
Added Git installation and configuration for patching.
1 parent ef989ce commit 5b6d871

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,31 @@
22
FROM eclipse-temurin:21-jdk-jammy AS build
33
WORKDIR /app
44

5+
# 1. Instala o Git (necessário para aplicar os patches do Paper)
6+
RUN apt-get update && apt-get install -y git
7+
8+
9+
RUN git config --global user.email "ci@teapaper.br" && \
10+
git config --global user.name "TeaPaper CI"
11+
512
# Copia os arquivos do projeto
613
COPY . .
714

815
# Dá permissão de execução ao gradlew
916
RUN chmod +x gradlew
1017

1118

12-
RUN ./gradlew clean build --no-daemon
19+
RUN ./gradlew applyPatches --no-daemon
20+
21+
22+
RUN ./gradlew createReobfPaperclipJar --no-daemon
1323

1424
# Estágio Final (Runtime)
1525
FROM eclipse-temurin:21-jre-jammy
1626
WORKDIR /server
1727

1828

19-
COPY --from=build /app/build/libs/*.jar server.jar
29+
COPY --from=build /app/build/libs/*-paperclip-*.jar server.jar
2030

2131
EXPOSE 25565
2232
CMD ["java", "-Xms2G", "-Xmx2G", "-jar", "server.jar"]

0 commit comments

Comments
 (0)