Last active
July 8, 2023 23:06
-
-
Save kcoderhtml/dfc6674cf92c540bf0952d6387e7feab to your computer and use it in GitHub Desktop.
Docker Compose itzg/minecraft-server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
mc: | |
container_name: mc | |
image: itzg/minecraft-server:latest | |
tty: true # equivalent for -t | |
stdin_open: true # equivalent for -i | |
# restart: unless-stopped | |
volumes: | |
# use a named, managed volume for data volume | |
- ./data:/data | |
# attach local host directory "mods" in same directory as this compose file | |
# all mods in this directory get copied into /data/mods at startup | |
# uncomment the following line if you are planning on adding mods | |
# - ~/mods:/mods:ro | |
env_file: .env | |
ports: | |
# expose the Minecraft server port outside of container | |
- 25565:25565 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment