§ Dockerfile

FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y mc wget openjdk-8-jdk-headless && useradd -ms /bin/bash fox && mkdir /minecraft
WORKDIR /minecraft
RUN wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar && echo "eula=true" > /minecraft/eula.txt
ADD server.properties /minecraft/
EXPOSE 25565/tcp
CMD 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
#Minecraft server properties
#Tue Jun 30 08:16:05 UTC 2020
spawn-protection=16
max-tick-time=60000
query.port=25565
generator-settings=
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=easy
broadcast-rcon-to-ops=true
spawn-monsters=true
op-permission-level=4
pvp=true
snooper-enabled=true
level-type=default
hardcore=false
enable-command-block=false
network-compression-threshold=256
max-players=20
max-world-size=29999984
resource-pack-sha1=
function-permission-level=2
rcon.port=25575
server-port=25565
server-ip=
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
online-mode=false
max-build-height=256
level-seed=
prevent-proxy-connections=false
use-native-transport=true
motd=A Minecraft Server
enable-rcon=false
30 июн, 2020
© 2007-2022 Жесть в том, что Земфира кусает над землей