From 007fca149c57480fd95e4bec4926d350374e35e9 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 15 Aug 2015 10:06:32 -0500 Subject: [PATCH] Adding info about using Docker Compose --- minecraft-server/README.md | 31 +++++++++++++++++++++++++++++ minecraft-server/docker-compose.yml | 14 +++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 minecraft-server/docker-compose.yml diff --git a/minecraft-server/README.md b/minecraft-server/README.md index af04a4d3..febbfb4b 100644 --- a/minecraft-server/README.md +++ b/minecraft-server/README.md @@ -127,6 +127,37 @@ up: docker stop $ID docker start $ID +## Using Docker Compose + +Rather than type the server options below, the port mappings above, etc +every time you want to create new Minecraft server, you can now use +[Docker Compose](https://docs.docker.com/compose/). Start with a +`docker-compose.yml` file like the following: + +``` +minecraft-server: + ports: + - "25565:25565" + + environment: + EULA: TRUE + + image: itzg/minecraft-server + + container_name: minecraft-server + + tty: true + stdin_open: true + restart: always +``` + +and in the same directory as that file run + + docker-compose -d up + +Now, go play...or adjust the `environment` section to configure +this server instance. + ## Server configuration ### Difficulty diff --git a/minecraft-server/docker-compose.yml b/minecraft-server/docker-compose.yml new file mode 100644 index 00000000..e4e8f7c5 --- /dev/null +++ b/minecraft-server/docker-compose.yml @@ -0,0 +1,14 @@ +minecraft-server: + ports: + - "25565:25565" + + environment: + EULA: TRUE + + image: itzg/minecraft-server + + container_name: minecraft-server + + tty: true + stdin_open: true + restart: always