mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
docs: add compose example of multiline MOTD (#2827)
This commit is contained in:
parent
cbcdfdc288
commit
e1262effef
@ -64,9 +64,25 @@ The section symbol (§) and other unicode characters are automatically converted
|
|||||||
|
|
||||||
![](../img/motd-example.png)
|
![](../img/motd-example.png)
|
||||||
|
|
||||||
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as
|
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as the following example.
|
||||||
|
|
||||||
|
!!! example "Multi-line MOTD"
|
||||||
|
|
||||||
|
With `docker run`
|
||||||
|
|
||||||
|
```
|
||||||
-e MOTD="Line one\nLine two"
|
-e MOTD="Line one\nLine two"
|
||||||
|
```
|
||||||
|
|
||||||
|
or within a compose file
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
MOTD: |
|
||||||
|
line one
|
||||||
|
line two
|
||||||
|
# or
|
||||||
|
# MOTD: "line one\nline two"
|
||||||
|
```
|
||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
|
|
||||||
|
12
examples/multiline-motd/docker-compose.yml
Normal file
12
examples/multiline-motd/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
MOTD: |
|
||||||
|
line one
|
||||||
|
line two
|
||||||
|
# or
|
||||||
|
# MOTD: "line one\nline two"
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
Loading…
Reference in New Issue
Block a user