64 lines
1.9 KiB
Markdown
64 lines
1.9 KiB
Markdown
# docker-minecraft
|
|
|
|
A Dockerfile and some assorted scripts to build a Minecraft Forge server container.
|
|
|
|
## Usage
|
|
|
|
Deploy as expected:
|
|
|
|
```bash
|
|
docker run -p 25565:25565 rehashedsalt/minecraft-forge:1.16.5-36.1.4-1.0.0
|
|
```
|
|
|
|
And badda bing, badda boom, you'll have a Minecraft Forge server of whatever the tag is.
|
|
|
|
For obvious reason, you **should never use the :latest tag!**
|
|
|
|
## Application State
|
|
|
|
For obvious reasons, you'll want to consult the documentation of any mods you have installed, but a majority of application state lives here-ish:
|
|
|
|
* `/minecraft/world`
|
|
|
|
* `/minecraft/ops.json`, `whitelist.json`, `banned-ips.json`, `banned-players.json`, etc.
|
|
|
|
* `/minecraft/logs`
|
|
|
|
## Environment Variables
|
|
|
|
variable|description
|
|
---|---
|
|
`JRE_XMX`|Maximum amount of heap passed to the main Minecraft process
|
|
`JRE_XMS`|Minimum heap size passed to the main Minecraft process
|
|
`FORGE_PACK_ZIP`|If provided, the URL to a zip or tar.gz file that contains the modpack that needs to be installed. Will be intelligently extracted into the server directory through the magic of `find`.
|
|
`ARGS`|Any additional arguments to be passed to the JVM
|
|
|
|
## Useful Arguments
|
|
|
|
The following arguments may be useful to pass through `$ARGS` from time to time:
|
|
|
|
* `-Dfml.queryResult=confirm` - Useful when confirming through world corruption
|
|
|
|
## Weird Defaults
|
|
|
|
The default `server.properties` contains the following changes to better facilitate usage in a modded environment:
|
|
|
|
```
|
|
allow-flight=true
|
|
difficulty=hard
|
|
enable-command-block=true
|
|
spawn-protection=0
|
|
```
|
|
|
|
## FAQ
|
|
|
|
**Why do you download the pack at runtime?**
|
|
|
|
It allows for transparent upgrades without having to build a whole new container. You may lose container consistency, but you gain simplicity in definition.
|
|
|
|
Of course, nothing prevents you from just not using this magic variable and instead `FROM`ing this container and building your own pack.
|
|
|
|
## License
|
|
|
|
MIT
|