Blame
|
1 | # Minecraft |
||||||
| 2 | ||||||||
| 3 | Docker compose.yml |
|||||||
| 4 | ```yaml |
|||||||
| 5 | services: |
|||||||
| 6 | mc: |
|||||||
| 7 | image: itzg/minecraft-server:latest |
|||||||
| 8 | container_name: minecraft_server |
|||||||
| 9 | ports: |
|||||||
| 10 | - "25565:25565" # Minecraft game port |
|||||||
| 11 | environment: |
|||||||
| 12 | EULA: "TRUE" # IMPORTANT: Set to TRUE to accept the Minecraft EULA |
|||||||
| 13 | TYPE: "PAPER" # Server type (e.g., VANILLA, FORGE, SPONGE, PAPER) |
|||||||
| 14 | VERSION: "LATEST" # Minecraft version (e.g., 1.20.4) |
|||||||
| 15 | # MEMORY: "2G" # Allocate 2GB of RAM to the server |
|||||||
| 16 | # MODE: "survival" # Game mode |
|||||||
| 17 | # DIFFICULTY: "normal" # Game difficulty |
|||||||
| 18 | # MOTD: "Welcome to my Docker Minecraft Server!" # Message of the Day |
|||||||
| 19 | volumes: |
|||||||
| 20 | - ./data:/data |
|||||||
| 21 | ``` |
|||||||
