From 9c4403d7ffc498e3877f084c595b42d04e0cafb1 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 15 Jul 2021 08:33:43 -0500 Subject: [PATCH] docs: corrected compose snippets within README --- README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2ff4c36c..7a2a8600 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,7 @@ When attached in this way you can stop the server, edit the configuration under With Docker Compose, setting up a host attached directory is even easier since relative paths can be configured. For example, with the following `docker-compose.yml` Docker will automatically create/attach the relative directory `minecraft-data` to the container. ```yaml -version: "3.8" +version: "3" services: mc: @@ -221,6 +221,9 @@ services: - 25565:25565 environment: EULA: "TRUE" + tty: true + stdin_open: true + restart: unless-stopped volumes: # attach a directory relative to the directory containing this compose file - ./minecraft-data:/data @@ -343,20 +346,18 @@ every time you want to create new Minecraft server, you can now use `docker-compose.yml` file like the following: ```yml -version: "3.8" +version: "3" -minecraft-server: - image: itzg/minecraft-server - - ports: - - "25565:25565" - - environment: - EULA: "TRUE" - - tty: true - stdin_open: true - restart: always +services: + mc: + image: itzg/minecraft-server + ports: + - 25565:25565 + environment: + EULA: "TRUE" + tty: true + stdin_open: true + restart: unless-stopped ``` and in the same directory as that file run