-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathDockerfile.dynmap
41 lines (33 loc) · 1.09 KB
/
Dockerfile.dynmap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM ubuntu
# Install dependencies
RUN apt-get update
RUN apt-get install -y git \
openjdk-17-jdk \
openjdk-17-jre \
wget \
git
# Create server directory
WORKDIR /testmcserver
# Clone & build dynmap (placed here to take advantage of docker caching)
RUN git clone https://github.com/webbukkit/dynmap
WORKDIR /testmcserver/dynmap
RUN /testmcserver/dynmap/gradlew :spigot:build
WORKDIR /testmcserver
# Build server
RUN wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
RUN git config --global --unset core.autocrlf || :
RUN java -jar BuildTools.jar --rev 1.20.4
RUN echo "eula=true" > eula.txt
RUN mkdir plugins
# Build plugin
COPY . /testmcserver/MedievalFactions
WORKDIR /testmcserver/MedievalFactions
RUN /testmcserver/MedievalFactions/gradlew build
WORKDIR /testmcserver
# Install plugin
RUN cp /testmcserver/MedievalFactions/build/libs/*-all.jar /testmcserver/plugins
# Install dynmap
RUN cp /testmcserver/dynmap/target/Dynmap-*.jar /testmcserver/plugins
# Run server
EXPOSE 25565
ENTRYPOINT java -jar spigot-1.20.4.jar