diff --git a/Dockerfile b/Dockerfile index 7632a050513..14946d25723 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,7 @@ ENV UID=1000 GID=1000 \ JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \ TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \ PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \ + RESOURCE_PACK= RESOURCE_PACK_SHA1= \ LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= MODS= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true SERVER_NAME="Dedicated Server" \ REPLACE_ENV_VARIABLES="FALSE" ENV_VARIABLE_PREFIX="CFG_" diff --git a/README.md b/README.md index 574cde65bd0..2930939a512 100644 --- a/README.md +++ b/README.md @@ -894,6 +894,14 @@ For example (just the `-e` bits): -e LEVEL_TYPE=flat -e 'GENERATOR_SETTINGS=3;minecraft:bedrock,3*minecraft:stone,52*minecraft:sandstone;2;' +### Custom Server Resource Pack + +You can set a link to a custom resource pack and set it's checksum using the `RESOURCE_PACK` and `RESOURCE_PACK_SHA1` options respectively, the default is blank: + + docker run -d -e 'RESROUCE_PACK=http\://link.com/to/pack.zip?\=1' -e 'RESOURCE_PACK_SHA1=d5db29cd03a2ed055086cef9c31c252b4587d6d0' + +**NOTE:** `:` and `=` must be escaped using `\`. The checksum plain-text hexadecimal. + ### World Save Name You can either switch between world saves or run multiple containers with different saves by using the `LEVEL` option, @@ -1033,4 +1041,4 @@ pass that at the end of `docker run` after the image name or set `-e CONSOLE=FAL ### Explicitly disable GUI Some older servers get confused and think that the GUI interface is enabled. You can explicitly -disable that by passing `-e GUI=FALSE`. \ No newline at end of file +disable that by passing `-e GUI=FALSE`. diff --git a/start-finalSetup04ServerProperties b/start-finalSetup04ServerProperties index 0f2e75802f2..a3815e67f53 100644 --- a/start-finalSetup04ServerProperties +++ b/start-finalSetup04ServerProperties @@ -70,6 +70,8 @@ function customizeServerProps { setServerProp "online-mode" "$ONLINE_MODE" setServerProp "allow-flight" "$ALLOW_FLIGHT" setServerProp "level-type" "${LEVEL_TYPE^^}" + setServerProp "resource-pack" "$RESOURCE_PACK" + setServerProp "resource-pack-sha1" "$RESOURCE_PACK_SHA1" if [ -n "$DIFFICULTY" ]; then case $DIFFICULTY in