Merge pull request #99 from jimtremblay/master

Add ability to change online-mode from environment variable when contained created
This commit is contained in:
Geoff Bourne 2016-08-03 21:16:47 -05:00 committed by GitHub
commit f1293ff979
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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