Go to file
Jimmy baea748f90 Update to java 17 2021-11-27 11:44:19 +13:00
src Open socket before defer close 2021-11-12 00:55:15 +13:00
.gitignore Remove binaries 2021-01-04 21:38:36 +13:00
Dockerfile Update to java 17 2021-11-27 11:44:19 +13:00
LICENSE Initial commit 2020-10-13 08:09:21 +00:00
README.md Fix typos 2021-09-20 21:43:14 +12:00
build.sh Use multi stage build 2021-09-20 21:40:53 +12:00
docker-compose.yml Add line ignore regex 2021-10-12 23:30:50 +13:00
get_minecraft.sh Add script to download Minecraft server 2021-01-04 21:40:40 +13:00
go.mod Initial commit 2020-10-13 21:21:37 +13:00
go.sum Initial commit 2020-10-13 21:21:37 +13:00

README.md

Docker Minecraft

Wrapper to run Minecraft in Docker

Build Image

./build.sh

Get Minecraft Sever For Testing

./get_minecraft.sh

Run Server

docker-compose up -d

docker run -it --name minecraft -p 25565:25565 -v $PWD:/server -e MAX_MEM=1G magmise/minecraft

Get Logs

docker-compose logs

docker logs minecraft

Send Command to Server

docker-compose exec cmd say hello

docker exec minecraft cmd say hello

Attach to Container

docker attach minecraft

To detach use ctrl+p ctrl+q

Don't use ctrl+c to disconnect, it will kill the server

Environmental Variables

JAR

Default is server.jar

MIN_MEM

Default is 512M

MAX_MEM

Default is 1G

STOP

Default is stop

This would be used for Bungee where the stop command is end