Go to file
Jimmy 81bbcf4b17 Add latest tag 2021-08-25 17:20:33 +12:00
src Initial commit 2020-10-13 21:21:37 +13:00
.gitignore Remove binaries 2021-01-04 21:38:36 +13:00
Dockerfile Update to Java 16 by default 2021-08-25 17:20:14 +12:00
LICENSE Initial commit 2020-10-13 08:09:21 +00:00
README.md Update readme 2021-01-05 03:24:19 +13:00
build.sh Add latest tag 2021-08-25 17:20:33 +12:00
docker-compose.yml Formatting 2021-01-05 03:27:16 +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

Varialbles

JAR

Default is server.jar

MIN_MEM

Default is 512M

MAX_MEM

Default is 1G

STOP

Default is stop

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