mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Adding info about using Docker Compose
This commit is contained in:
parent
ac608b7abb
commit
007fca149c
@ -127,6 +127,37 @@ up:
|
|||||||
docker stop $ID
|
docker stop $ID
|
||||||
docker start $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
|
## Server configuration
|
||||||
|
|
||||||
### Difficulty
|
### Difficulty
|
||||||
|
14
minecraft-server/docker-compose.yml
Normal file
14
minecraft-server/docker-compose.yml
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user