Go to file
Jimmy 23294760b6 Add default regex 2021-10-12 23:30:02 +13:00
src Reset colour 2021-09-21 11:32:37 +12:00
.gitignore Remove binaries 2021-01-04 21:38:36 +13:00
Dockerfile Add default regex 2021-10-12 23:30:02 +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 Swtich to latest 2021-08-25 17:21:02 +12: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