§ Dockerfile

1FROM ubuntu
2ENV DEBIAN_FRONTEND=noninteractive
3RUN apt-get update && apt-get install -y mc wget openjdk-8-jdk-headless && useradd -ms /bin/bash fox && mkdir /minecraft
4WORKDIR /minecraft
5RUN wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar && echo "eula=true" > /minecraft/eula.txt
6ADD server.properties /minecraft/
7EXPOSE 25565/tcp
8CMD java -Xms1G -Xmx1G -jar /minecraft/server.jar

§ Makefile

build:
	docker build -t minecraft .
run:
	docker run --rm --net docknet --ip 172.18.2.0 --name=minecraft-cont -v ${PWD}/mc:/minedata/ -dt minecraft
bash:
	docker exec --user=root -it minecraft-cont bash
logs:
	docker logs minecraft-cont

§ server.properties

Отключен online-mode=false
1#Minecraft server properties
2#Tue Jun 30 08:16:05 UTC 2020
3spawn-protection=16
4max-tick-time=60000
5query.port=25565
6generator-settings=
7force-gamemode=false
8allow-nether=true
9enforce-whitelist=false
10gamemode=survival
11broadcast-console-to-ops=true
12enable-query=false
13player-idle-timeout=0
14difficulty=easy
15broadcast-rcon-to-ops=true
16spawn-monsters=true
17op-permission-level=4
18pvp=true
19snooper-enabled=true
20level-type=default
21hardcore=false
22enable-command-block=false
23network-compression-threshold=256
24max-players=20
25max-world-size=29999984
26resource-pack-sha1=
27function-permission-level=2
28rcon.port=25575
29server-port=25565
30server-ip=
31spawn-npcs=true
32allow-flight=false
33level-name=world
34view-distance=10
35resource-pack=
36spawn-animals=true
37white-list=false
38rcon.password=
39generate-structures=true
40online-mode=false
41max-build-height=256
42level-seed=
43prevent-proxy-connections=false
44use-native-transport=true
45motd=A Minecraft Server
46enable-rcon=false