Docker wrapper to run Minecraft in Docker
Go to file
Jimmy 8feaca77b2 Update readme 2021-01-05 03:24:19 +13:00
src Initial commit 2020-10-13 21:21:37 +13:00
.gitignore Remove binaries 2021-01-04 21:38:36 +13:00
Dockerfile Remove entry.sh 2021-01-04 21:39:06 +13: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 Remove binaries 2021-01-04 21:38:36 +13:00
docker-compose.yml Add example of MIN_MEM STOP and JAR 2021-01-04 21:33:44 +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