docs: corrected compose snippets within README

This commit is contained in:
Geoff Bourne 2021-07-15 08:33:43 -05:00 committed by GitHub
parent 3c0566cb87
commit 9c4403d7ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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