Skip to content

Commit dedf8bc

Browse files
authored
docs: clarify Fabric docs TYPE usage (#3387)
1 parent abb33d2 commit dedf8bc

File tree

1 file changed

+36
-12
lines changed
  • docs/types-and-platforms/server-types

1 file changed

+36
-12
lines changed

docs/types-and-platforms/server-types/fabric.md

+36-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,45 @@
1-
Enable [Fabric server](https://fabricmc.net/) mode by adding a `-e TYPE=FABRIC` to your command-line.
1+
A [Fabric server](https://fabricmc.net/) can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "FABRIC"
22

3-
```
4-
docker run -d -v /path/on/host:/data \
5-
-e TYPE=FABRIC \
6-
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
7-
```
3+
!!! example
4+
5+
Using `docker run` command line
6+
7+
```
8+
docker run -d -e EULA=TRUE -e TYPE=FABRIC -p 25565:25565 itzg/minecraft-server
9+
```
10+
11+
In a compose file service:
12+
13+
```yaml
14+
environment:
15+
EULA: TRUE
16+
TYPE: FABRIC
17+
```
818

919
By default, the container will install the latest [fabric server launcher](https://fabricmc.net/use/server/), using the latest [fabric-loader](https://fabricmc.net/wiki/documentation:fabric_loader) against the minecraft version you have defined with `VERSION` (defaulting to the latest vanilla release of the game).
1020

1121
A specific loader or launcher version other than the latest can be requested using `FABRIC_LOADER_VERSION` and `FABRIC_LAUNCHER_VERSION` respectively, such as:
1222

13-
```
14-
docker run -d -v /path/on/host:/data ... \
15-
-e TYPE=FABRIC \
16-
-e FABRIC_LAUNCHER_VERSION=0.10.2 \
17-
-e FABRIC_LOADER_VERSION=0.13.1
18-
```
23+
!!! example "Using launcher and loader versions"
24+
25+
With docker run
26+
27+
```
28+
docker run -d ... \
29+
-e TYPE=FABRIC \
30+
-e FABRIC_LAUNCHER_VERSION=0.10.2 \
31+
-e FABRIC_LOADER_VERSION=0.13.1
32+
```
33+
34+
In a compose file service:
35+
36+
```yaml
37+
environment:
38+
EULA: TRUE
39+
TYPE: FABRIC
40+
FABRIC_LAUNCHER_VERSION: 0.10.2
41+
FABRIC_LOADER_VERSION: 0.13.1
42+
```
1943

2044
!!! note
2145

0 commit comments

Comments
 (0)