mirror of
https://github.com/itzg/docker-minecraft-server
synced 2025-01-21 16:33:55 +00:00
27 lines
641 B
Markdown
27 lines
641 B
Markdown
|
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:
|
||
|
|
||
|
``` yaml
|
||
|
version: "3"
|
||
|
|
||
|
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
|
||
|
|
||
|
docker-compose up -d
|
||
|
|
||
|
Now, go play...or adjust the `environment` section to configure
|
||
|
this server instance.
|