28 lines
455 B
Bash
Executable File
28 lines
455 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
docker run \
|
|
--detach \
|
|
--name minecraft \
|
|
--restart unless-stopped \
|
|
--env EULA=TRUE \
|
|
--env MAX_MEMORY=8G \
|
|
--env VERSION=1.15.2 \
|
|
--volume /bigdata/k8s-config/minecraft/data:/data:rw \
|
|
--publish 127.0.0.1:25565:25565 \
|
|
docker.io/itzg/minecraft-server:latest
|
|
}
|
|
|
|
down () {
|
|
docker stop minecraft || true
|
|
docker rm minecraft || true
|
|
}
|
|
|
|
logs () {
|
|
docker logs --follow minecraft
|
|
}
|
|
|
|
$@
|