FLODARELTIH commited on
Commit
9b8af50
·
verified ·
1 Parent(s): 79a91e7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -12
Dockerfile CHANGED
@@ -1,24 +1,26 @@
1
  FROM itzg/minecraft-server:latest
2
 
3
- # Server environment configurations
 
 
4
  ENV EULA=TRUE
5
- ENV VERSION=LATEST
6
- # Set initial and maximum memory limits to 8 GB
7
  ENV INIT_MEMORY=8G
8
  ENV MAX_MEMORY=8G
9
  ENV DIFFICULTY=peaceful
10
  ENV GAMEMODE=creative
11
- # Mojang servers and HF servers are having a communication issue apparently
12
- ENV ONLINE_MODE=FALSE
13
- # I should warn about that...
14
- RUN echo "You will get a security warning about online mode being disabled, ignore it unless you get hacked."
15
-
16
- # Random seed?
17
  ENV MOTD="A server hosted on HF Spaces"
18
  ENV MAX_PLAYERS=40
 
19
 
20
  EXPOSE 25565
21
- ENV SERVER_PORT=25565
22
 
23
- # HF complains because of the lack of an HTTP server, which also seems to break Minecraft...
24
- RUN echo "Ignore the 500 error. If it's not a Minecraft error, it's not a relavent one."
 
 
 
 
 
 
 
 
1
  FROM itzg/minecraft-server:latest
2
 
3
+ # Use Paper instead of vanilla
4
+ ENV TYPE=PAPER
5
+ ENV VERSION=1.21.9
6
  ENV EULA=TRUE
7
+ ENV ONLINE_MODE=FALSE
 
8
  ENV INIT_MEMORY=8G
9
  ENV MAX_MEMORY=8G
10
  ENV DIFFICULTY=peaceful
11
  ENV GAMEMODE=creative
 
 
 
 
 
 
12
  ENV MOTD="A server hosted on HF Spaces"
13
  ENV MAX_PLAYERS=40
14
+ ENV SERVER_PORT=25565
15
 
16
  EXPOSE 25565
 
17
 
18
+ # Warn about online mode
19
+ RUN echo "Online mode disabled: ignore the warning unless hacked."
20
+
21
+ # Copy everything from container to plugins folder
22
+ RUN mkdir -p /data/plugins && \
23
+ cp -r /opt/minecraft/* /data/plugins/
24
+
25
+ # Optional: warn about HTTP errors on HF Spaces
26
+ RUN echo "Ignore HF Spaces 500 errors, not Minecraft-related."