-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (21 loc) · 827 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (21 loc) · 827 Bytes
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
FROM debian:stable
LABEL authors=tsaki
ARG REV="latest"
ARG SERVER_OPTIONS="-Xmx1G -Xms1G"
RUN apt-get update \
&& apt-get install -y wget git screen openjdk-17-jdk
RUN mkdir -p /opt/build-tools \
mkdir -p /opt/minecraft-server
WORKDIR /opt/build-tools
RUN wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O /opt/build-tools/BuildTools.jar \
&& java -jar /opt/build-tools/BuildTools.jar --rev $REV
WORKDIR /opt
RUN mv ./build-tools/spigot*.jar ./minecraft-server/server.jar
RUN echo "eula=true" > ./minecraft-server/eula.txt
RUN apt-get remove -y wget git
WORKDIR /opt/minecraft-server
ADD server.properties ./server.properties
EXPOSE 25565
EXPOSE 25565/udp
VOLUME /opt/minecraft-server
ENTRYPOINT ["java", "$SERVER_OPTIONS", "-jar", "server.jar"]