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.
|
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
|
```yaml
|
||||||
version: "3.8"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
@ -221,6 +221,9 @@ services:
|
|||||||
- 25565:25565
|
- 25565:25565
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
# attach a directory relative to the directory containing this compose file
|
# attach a directory relative to the directory containing this compose file
|
||||||
- ./minecraft-data:/data
|
- ./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:
|
`docker-compose.yml` file like the following:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
version: "3.8"
|
version: "3"
|
||||||
|
|
||||||
minecraft-server:
|
services:
|
||||||
image: itzg/minecraft-server
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- 25565:25565
|
||||||
|
environment:
|
||||||
environment:
|
EULA: "TRUE"
|
||||||
EULA: "TRUE"
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
tty: true
|
restart: unless-stopped
|
||||||
stdin_open: true
|
|
||||||
restart: always
|
|
||||||
```
|
```
|
||||||
|
|
||||||
and in the same directory as that file run
|
and in the same directory as that file run
|
||||||
|
Loading…
Reference in New Issue
Block a user