Auto-merging via docker-versions-create

This commit is contained in:
Geoff Bourne 2020-03-30 08:32:11 -05:00
commit 828a48998f
5 changed files with 29 additions and 44 deletions

View File

@ -52,7 +52,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=1.3.3 --var app=mc-server-runner --file {{.app}} \
--var version=1.3.5 --var app=mc-server-runner --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
@ -61,7 +61,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
COPY mcstatus /usr/local/bin
VOLUME ["/data","/mods","/config"]
VOLUME ["/data"]
COPY server.properties /tmp/server.properties
COPY log4j2.xml /tmp/log4j2.xml
WORKDIR /data

View File

@ -11,6 +11,8 @@ latest snapshot. See the *Versions* section below for more information.
[![Click for more docs](https://i.imgur.com/jS02ebD.png)](https://github.com/itzg/docker-minecraft-server/blob/master/README.md)
[Full docs available in Github](https://github.com/itzg/docker-minecraft-server/blob/master/README.md)
To simply use the latest stable version, run
docker run -d -p 25565:25565 --name mc itzg/minecraft-server
@ -470,49 +472,19 @@ variable. An FTB/CurseForge server modpack is available together with its respec
client modpack on https://www.feed-the-beast.com under "Additional Files." Similar you can
locate the modpacks for CurseForge at https://minecraft.curseforge.com/modpacks .
There are a couple of options for obtaining an FTB/CurseForge modpack.
One options is that you can pre-download the **server** modpack and copy the modpack to the `/data`
directory (see "Attaching data directory to host filesystem”).
Now you can add a `-e FTB_SERVER_MOD=name_of_modpack.zip` to your command-line.
docker run -d -v /path/on/host:/data -e TYPE=FTB \
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.6.zip \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
Instead of pre-downloading a modpack from the FTB/CurseForge site, you
can you set `FTB_SERVER_MOD` (or `CF_SERVER_MOD`) to the **server** URL of a modpack, such as
If you don't want to keep the pre-download modpacks separate from your data directory,
then you can attach another volume at a path of your choosing and reference that.
The following example uses `/modpacks` as the container path as the pre-download area:
docker run ... \
-e TYPE=FTB \
-e FTB_SERVER_MOD=https://www.feed-the-beast.com/projects/ftb-infinity-lite-1-10/files/2402889
or for a CurseForce modpack:
docker run ... \
-e TYPE=CURSEFORGE \
-e CF_SERVER_MOD=https://minecraft.curseforge.com/projects/enigmatica2expert/files/2663153/download
### Using the /data volume
You must use a persistent `/data` mount for this type of server.
To do this, you will need to attach the container's `/data` directory
(see "Attaching data directory to host filesystem”).
If the modpack is updated and you want to run the new version on your
server, you stop and remove the container:
docker stop mc
docker rm mc
Do not erase anything from your /data directory (unless you know of
specific mods that have been removed from the modpack). Download the
updated FTB server modpack and copy it to `/data`. Start a new container
with `FTB_SERVER_MOD` specifying the updated modpack file.
$ docker run -d -v /path/on/host:/data -e TYPE=FTB \
-e FTB_SERVER_MOD=FTBPresentsSkyfactory3Server_3.0.7.zip \
docker run -d -v /path/on/host:/data -v /path/to/modpacks:/modpacks \
-e TYPE=FTB \
-e FTB_SERVER_MOD=/modpacks/FTBPresentsSkyfactory3Server_3.0.6.zip \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
### Fixing "unable to launch forgemodloader"
@ -527,8 +499,8 @@ then you apply a workaround by adding this to the run invocation:
### Using a client-made curseforge modpack
If you use something like curseforge, you may end up creating/using modpacks that do not
contain server mod jars. Instead, the curseforge setup has `manifest.json` files, which
If you use something like CurseForge, you may end up creating/using modpacks that do not
contain server mod jars. Instead, the CurseForge setup has `manifest.json` files, which
will show up under `/data/FeedTheBeast/manifest.json`.
To use these packs you will need to:
@ -559,7 +531,7 @@ $ docker run -itd --name derpcraft \
itzg/minecraft-server
```
Note the `CF_SERVER_MOD` env var should match the url to download the modpack you are targeting.
Note the `CF_SERVER_MOD` env var should match the server version of the modpack you are targeting.
## Running a SpongeVanilla server
@ -1088,3 +1060,11 @@ pass that at the end of `docker run` after the image name or set `-e CONSOLE=FAL
Some older servers get confused and think that the GUI interface is enabled. You can explicitly
disable that by passing `-e GUI=FALSE`.
## Running on RaspberryPi
To run this image on a RaspberryPi 3 B+, 4, or newer, use the image tag
itzg/minecraft-server:armv7
> NOTE: you may need to lower the memory allocation, such as `-e MEMORY=750m`

View File

@ -47,7 +47,6 @@ fi
export SERVER_PROPERTIES=/data/server.properties
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
log "Checking version information."
case "X$VERSION" in
X|XLATEST|Xlatest)
export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'`
@ -62,12 +61,13 @@ case "X$VERSION" in
export VANILLA_VERSION=`curl -fsSL $VERSIONS_JSON | jq -r '.latest.release'`
;;
esac
log "Resolved version given ${VERSION} into ${VANILLA_VERSION}"
cd /data
export ORIGINAL_TYPE=${TYPE^^}
log "Checking type information."
log "Resolving type given ${TYPE}"
case "${TYPE^^}" in
*BUKKIT|SPIGOT)
exec /start-deployBukkitSpigot $@

View File

@ -107,7 +107,8 @@ export FTB_SERVER_START=$(find "${FTB_BASE_DIR}" $entryScriptExpr)
export FTB_DIR=$(dirname "${FTB_SERVER_START}")
chmod a+x "${FTB_SERVER_START}"
sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}"
grep fml.queryResult=confirm ${FTB_SERVER_START} > /dev/null || \
sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}"
sed -i 's/.*read.*Restart now/#\0/' "${FTB_SERVER_START}"
legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar"

View File

@ -119,6 +119,10 @@ EOF
if [ -f "${FTB_DIR}/settings.cfg" ]; then
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg"
fi
# if missing shebang line, then run file through bash
if ! head -1 "${FTB_SERVER_START}"|grep -q "^#!"; then
mcServerRunnerArgs="${mcServerRunnerArgs} --shell bash"
fi
cd "${FTB_DIR}"
log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."