28 lines
460 B
Bash
Executable File
28 lines
460 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.18.1 \
|
|
--volume /bigdata/k8s-config/minecraft/1.18-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
|
|
}
|
|
|
|
$@
|