mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
docs: corrected compose snippets within README
This commit is contained in:
parent
3c0566cb87
commit
9c4403d7ff
29
README.md
29
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
|
||||
|
Loading…
Reference in New Issue
Block a user