mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Merge pull request #99 from jimtremblay/master
Add ability to change online-mode from environment variable when contained created
This commit is contained in:
commit
f1293ff979
@ -39,4 +39,4 @@ ENV UID=1000 GID=1000 \
|
|||||||
MOTD="A Minecraft Server Powered by Docker" \
|
MOTD="A Minecraft Server Powered by Docker" \
|
||||||
JVM_OPTS="-Xmx1024M -Xms1024M" \
|
JVM_OPTS="-Xmx1024M -Xms1024M" \
|
||||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy \
|
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy \
|
||||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK=
|
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= ONLINE_MODE=TRUE
|
||||||
|
@ -537,6 +537,12 @@ To use this option pass the environment variable `MODPACK`, such as
|
|||||||
top level of the zip archive. Make sure the jars are compatible with the
|
top level of the zip archive. Make sure the jars are compatible with the
|
||||||
particular `TYPE` of server you are running.
|
particular `TYPE` of server you are running.
|
||||||
|
|
||||||
|
### Online mode
|
||||||
|
|
||||||
|
By default, server checks connecting players against Minecraft's account database. If you want to create an offline server or your server is not connected to the internet, you can disable the server to try connecting to minecraft.net to authenticate players with environment variable `ONLINE_MODE`, like this
|
||||||
|
|
||||||
|
docker run -d -e ONLINE_MODE=FALSE ...
|
||||||
|
|
||||||
## JVM Configuration
|
## JVM Configuration
|
||||||
|
|
||||||
### Memory Limit
|
### Memory Limit
|
||||||
|
@ -316,6 +316,7 @@ if [ ! -e server.properties ]; then
|
|||||||
setServerProp "level-seed" "$SEED"
|
setServerProp "level-seed" "$SEED"
|
||||||
setServerProp "pvp" "$PVP"
|
setServerProp "pvp" "$PVP"
|
||||||
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
|
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
|
||||||
|
setServerProp "online-mode" "$ONLINE_MODE"
|
||||||
|
|
||||||
if [ -n "$LEVEL_TYPE" ]; then
|
if [ -n "$LEVEL_TYPE" ]; then
|
||||||
# normalize to uppercase
|
# normalize to uppercase
|
||||||
|
Loading…
Reference in New Issue
Block a user