Skip to content

Instantly share code, notes, and snippets.

@mlnchk
Last active February 7, 2023 17:25
Show Gist options
  • Save mlnchk/2d1814573834d62f05f8503863291bae to your computer and use it in GitHub Desktop.
Save mlnchk/2d1814573834d62f05f8503863291bae to your computer and use it in GitHub Desktop.
Minecraft server docker-compose
~$ ls
docker-compose.yml minecraft-worlds
~$ ls minecraft-worlds
tiflis
# world should be in ./worlds/tiflis directory
version: "3"
services:
mc:
image: itzg/minecraft-server
ports:
- 25565:25565
environment:
EULA: "TRUE"
WORLD: "/worlds/tiflis"
ENABLE_COMMAND_BLOCK: "TRUE"
OPS: "greedyeugene,eugene_one,Kuropatka"
# for licensed clients
ONLINE_MODE: "TRUE"
WHITELIST: "greedyeugene,eugene_one,Kuropatka"
# for cracked clients
# ONLINE_MODE: "FALSE"
tty: true
stdin_open: true
restart: unless-stopped
volumes:
# attach a directory relative to the directory containing this compose file
- ./minecraft-data:/data
- ./minecraft-worlds:/worlds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment