Or... at least it's running natively in a Windows Container on Microsofts Nanoserver.
- Download the minecraft
server.jar
from https://minecraft.net/download/server - Add it to the
minecraft
folder
-
Copied from Oracle Java on Docker
- Download Server JRE 8
.tar.gz
file. place it beside theDockerfile
- Download Server JRE 8
-
Overwrite the values in the
Dockerfile
with your corresponding file, and its contents
In minecraft/eula.txt
, change the value from eula=false
to eula=true
, indicating your agreement to Mojangs Minecraft EULA.
docker build -t figaw/mc:latest -t figaw/mc:1.0 .
docker run -d -p 25565:25565 --name minecraft figaw/mc
Find the IP to connect to it with
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' minecraft
docker rm -f minecraft
docker logs minecraft
Add -f
to follow, ctrl + c
to stop following.
java -Xmx1024M -Xms1024M -jar -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 server.jar nogui
- Add a version with a powershell build container
- Add a volume for worlds, i.e. persistent storage