mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
Compare commits
45 Commits
2021.18.0-
...
2021.19.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19c5626085 | ||
|
|
179cd878a9 | ||
|
|
788548d1f4 | ||
|
|
0ae15c2b3c | ||
|
|
b5b4257032 | ||
|
|
657db124b2 | ||
|
|
f5ea43b3d3 | ||
|
|
01747510d5 | ||
|
|
ff8b160a2b | ||
|
|
28b7afda15 | ||
|
|
ecd253dd3e | ||
|
|
03cbbd465a | ||
|
|
8d0dbcd50e | ||
|
|
592f18358a | ||
|
|
905906fa6c | ||
|
|
c862745534 | ||
|
|
ead8543b48 | ||
|
|
d34ae9d57d | ||
|
|
b6e53249f9 | ||
|
|
8020f83c3d | ||
|
|
fe01df78c4 | ||
|
|
afd0865d33 | ||
|
|
bcf408fb44 | ||
|
|
37f59eecd9 | ||
|
|
4ae2e5592f | ||
|
|
8fc44e0071 | ||
|
|
f3fa90b700 | ||
|
|
c1322a23ea | ||
|
|
4cbf481441 | ||
|
|
1cd8ec83ef | ||
|
|
9778bddd4f | ||
|
|
a03a1a8eff | ||
|
|
408af32fbe | ||
|
|
141d6c7125 | ||
|
|
ddd4712ea0 | ||
|
|
680987a385 | ||
|
|
655ae04abb | ||
|
|
f62dd55300 | ||
|
|
b5877f6208 | ||
|
|
d561c026c6 | ||
|
|
3cd3ca9d88 | ||
|
|
b9ef9a46b6 | ||
|
|
275863f04c | ||
|
|
ae94a6be3a | ||
|
|
d08c6e2c46 |
2
.github/workflows/build-multiarch.yml
vendored
2
.github/workflows/build-multiarch.yml
vendored
@@ -63,7 +63,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.7.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
|
|||||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -70,7 +70,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.7.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
|
|||||||
@@ -70,5 +70,5 @@ The multiarch images are built and published by [a Github action](https://github
|
|||||||
The following git command can be used to provide the bulk of release notes content:
|
The following git command can be used to provide the bulk of release notes content:
|
||||||
|
|
||||||
```shell script
|
```shell script
|
||||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --grep "^build(deps)" --pretty="- %s" 1.1.0..1.2.0
|
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="- %s" 1.1.0..1.2.0
|
||||||
```
|
```
|
||||||
|
|||||||
41
Dockerfile
41
Dockerfile
@@ -1,29 +1,29 @@
|
|||||||
FROM openjdk:8u212-jre-alpine
|
FROM adoptopenjdk:16-jre
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
RUN apk add --no-cache -U \
|
RUN apt-get update \
|
||||||
openssl \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get install -y \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
lsof \
|
gosu \
|
||||||
su-exec \
|
sudo \
|
||||||
shadow \
|
net-tools \
|
||||||
bash \
|
curl wget \
|
||||||
curl iputils wget \
|
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
|
dos2unix \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
tzdata \
|
tzdata \
|
||||||
rsync \
|
rsync \
|
||||||
nano \
|
nano \
|
||||||
sudo \
|
unzip \
|
||||||
knock \
|
knockd \
|
||||||
ttf-dejavu
|
ttf-dejavu \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
RUN addgroup -g 1000 minecraft \
|
RUN addgroup --gid 1000 minecraft \
|
||||||
&& adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
|
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||||
&& mkdir -m 777 /data \
|
|
||||||
&& chown minecraft:minecraft /data /home/minecraft
|
|
||||||
|
|
||||||
COPY files/sudoers* /etc/sudoers.d
|
COPY files/sudoers* /etc/sudoers.d
|
||||||
|
|
||||||
@@ -31,9 +31,9 @@ EXPOSE 25565 25575
|
|||||||
|
|
||||||
# hook into docker BuildKit --platform support
|
# hook into docker BuildKit --platform support
|
||||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||||
ARG TARGETOS=linux
|
ARG TARGETOS
|
||||||
ARG TARGETARCH=amd64
|
ARG TARGETARCH
|
||||||
ARG TARGETVARIANT=""
|
ARG TARGETVARIANT
|
||||||
|
|
||||||
ARG EASY_ADD_VER=0.7.1
|
ARG EASY_ADD_VER=0.7.1
|
||||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||||
@@ -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
|
--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} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
--var version=1.6.0 --var app=mc-server-runner --file {{.app}} \
|
--var version=1.7.0 --var app=mc-server-runner --file {{.app}} \
|
||||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--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} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
@@ -69,7 +69,7 @@ WORKDIR /data
|
|||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
ENV UID=1000 GID=1000 \
|
ENV UID=1000 GID=1000 \
|
||||||
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
MEMORY="1G" \
|
||||||
TYPE=VANILLA VERSION=LATEST \
|
TYPE=VANILLA VERSION=LATEST \
|
||||||
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||||
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||||
@@ -84,5 +84,6 @@ RUN dos2unix /start* && chmod +x /start*
|
|||||||
RUN dos2unix /health.sh && chmod +x /health.sh
|
RUN dos2unix /health.sh && chmod +x /health.sh
|
||||||
RUN dos2unix /autopause/* && chmod +x /autopause/*.sh
|
RUN dos2unix /autopause/* && chmod +x /autopause/*.sh
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/start" ]
|
ENTRYPOINT [ "/start" ]
|
||||||
HEALTHCHECK --start-period=1m CMD /health.sh
|
HEALTHCHECK --start-period=1m CMD /health.sh
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -38,6 +38,7 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||||||
* [Examples](#examples)
|
* [Examples](#examples)
|
||||||
* [Amazon Web Services (AWS) Deployment](#amazon-web-services-aws-deployment)
|
* [Amazon Web Services (AWS) Deployment](#amazon-web-services-aws-deployment)
|
||||||
* [Using Docker Compose](#using-docker-compose)
|
* [Using Docker Compose](#using-docker-compose)
|
||||||
|
* [Troubleshooting](#troubleshooting)
|
||||||
* [Server types](#server-types)
|
* [Server types](#server-types)
|
||||||
* [Running a Forge Server](#running-a-forge-server)
|
* [Running a Forge Server](#running-a-forge-server)
|
||||||
* [Running a Bukkit/Spigot server](#running-a-bukkitspigot-server)
|
* [Running a Bukkit/Spigot server](#running-a-bukkitspigot-server)
|
||||||
@@ -52,6 +53,7 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||||||
* [Running an Canyon server](#running-an-canyon-server)
|
* [Running an Canyon server](#running-an-canyon-server)
|
||||||
* [Running a SpongeVanilla server](#running-a-spongevanilla-server)
|
* [Running a SpongeVanilla server](#running-a-spongevanilla-server)
|
||||||
* [Running a Fabric Server](#running-a-fabric-server)
|
* [Running a Fabric Server](#running-a-fabric-server)
|
||||||
|
* [Running a Limbo server](#running-a-limbo-server)
|
||||||
* [Running a server with a Feed the Beast modpack](#running-a-server-with-a-feed-the-beast-modpack)
|
* [Running a server with a Feed the Beast modpack](#running-a-server-with-a-feed-the-beast-modpack)
|
||||||
* [Environment Variables:](#environment-variables)
|
* [Environment Variables:](#environment-variables)
|
||||||
* [Upgrading](#upgrading)
|
* [Upgrading](#upgrading)
|
||||||
@@ -127,7 +129,7 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||||||
* [Enabling Autopause](#enabling-autopause)
|
* [Enabling Autopause](#enabling-autopause)
|
||||||
* [Running on RaspberryPi](#running-on-raspberrypi)
|
* [Running on RaspberryPi](#running-on-raspberrypi)
|
||||||
|
|
||||||
<!-- Added by: runner, at: Sun Aug 1 17:09:36 UTC 2021 -->
|
<!-- Added by: runner, at: Sun Aug 29 21:26:46 UTC 2021 -->
|
||||||
|
|
||||||
<!--te-->
|
<!--te-->
|
||||||
|
|
||||||
@@ -349,6 +351,14 @@ and in the same directory as that file run
|
|||||||
Now, go play...or adjust the `environment` section to configure
|
Now, go play...or adjust the `environment` section to configure
|
||||||
this server instance.
|
this server instance.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
To troubleshoot the container initialization, such as when server files are pre-downloaded, set the environment variable `DEBUG` to `true`. The container logs will include **much more** output, and it is highly recommended including that output when reporting any [issues](https://github.com/itzg/docker-minecraft-server/issues).
|
||||||
|
|
||||||
|
To troubleshoot just the command-line used to start the Minecraft server, set the environment variable `DEBUG_EXEC` to `true`.
|
||||||
|
|
||||||
|
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
|
||||||
|
|
||||||
## Server types
|
## Server types
|
||||||
|
|
||||||
### Running a Forge Server
|
### Running a Forge Server
|
||||||
@@ -553,6 +563,20 @@ docker run -d -v /path/on/host:/data ... \
|
|||||||
|
|
||||||
In order to add mods, you have two options:
|
In order to add mods, you have two options:
|
||||||
|
|
||||||
|
### Running a Limbo server
|
||||||
|
|
||||||
|
A [Limbo](https://github.com/LOOHP/Limbo) server can be run by setting `TYPE` to `LIMBO`.
|
||||||
|
|
||||||
|
Configuration options with defaults:
|
||||||
|
|
||||||
|
- `LIMBO_BUILD`=LATEST
|
||||||
|
|
||||||
|
The `VERSION` will be ignored so locate the appropriate value from [here](https://ci.loohpjames.com/job/Limbo/) to match the version expected by clients.
|
||||||
|
|
||||||
|
- `FORCE_REDOWNLOAD`=false
|
||||||
|
- `LIMBO_SCHEMA_FILENAME`=default.schem
|
||||||
|
- `LEVEL`="Default;${LIMBO_SCHEMA_FILENAME}"
|
||||||
|
|
||||||
## Running a server with a Feed the Beast modpack
|
## Running a server with a Feed the Beast modpack
|
||||||
|
|
||||||
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
||||||
@@ -985,6 +1009,10 @@ For example (just the `-e` bits):
|
|||||||
|
|
||||||
-e LEVEL_TYPE=flat -e 'GENERATOR_SETTINGS=3;minecraft:bedrock,3*minecraft:stone,52*minecraft:sandstone;2;'
|
-e LEVEL_TYPE=flat -e 'GENERATOR_SETTINGS=3;minecraft:bedrock,3*minecraft:stone,52*minecraft:sandstone;2;'
|
||||||
|
|
||||||
|
In Minecraft 1.13+ you need to pass json ([generator site](https://misode.github.io/world/)) like this (details see [here](https://github.com/itzg/docker-minecraft-server/issues/999#issuecomment-907849644)):
|
||||||
|
|
||||||
|
-e LEVEL_TYPE=flat -e 'GENERATOR_SETTINGS={"biome":"minecraft:the_void","layers":[{"block":"minecraft:bedrock","height":1},{"block":"minecraft:stone","height":10},{"block":"minecraft:dirt","height":1}],"structures":{"structures":{}}}'
|
||||||
|
|
||||||
### Custom Server Resource Pack
|
### 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:
|
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:
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ current_uptime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
java_running() {
|
java_running() {
|
||||||
[[ $( ps -a -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
java_process_exists() {
|
java_process_exists() {
|
||||||
[[ -n "$(ps -a -o comm | grep 'java')" ]]
|
[[ -n "$(ps -ax -o comm | grep 'java')" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
rcon_client_exists() {
|
rcon_client_exists() {
|
||||||
[[ -n "$(ps -a -o comm | grep 'rcon-cli')" ]]
|
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
mc_server_listening() {
|
mc_server_listening() {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
[unpauseMCServer-server]
|
[unpauseMCServer-server]
|
||||||
sequence = 25565
|
sequence = 25565
|
||||||
seq_timeout = 1
|
seq_timeout = 1
|
||||||
command = /sbin/su-exec minecraft:minecraft /autopause/resume.sh
|
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||||
tcpflags = syn
|
tcpflags = syn
|
||||||
[unpauseMCServer-rcon]
|
[unpauseMCServer-rcon]
|
||||||
sequence = 25575
|
sequence = 25575
|
||||||
seq_timeout = 1
|
seq_timeout = 1
|
||||||
command = /sbin/su-exec minecraft:minecraft /autopause/resume.sh
|
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||||
tcpflags = syn
|
tcpflags = syn
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
. /start-utils
|
. /start-utils
|
||||||
|
|
||||||
if [[ $( ps -a -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then
|
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then
|
||||||
# save world
|
# save world
|
||||||
rcon-cli save-all >/dev/null
|
rcon-cli save-all >/dev/null
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
. /start-utils
|
. /start-utils
|
||||||
|
|
||||||
if [[ $( ps -a -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||||
logAutopauseAction "Knocked, resuming Java process"
|
logAutopauseAction "Knocked, resuming Java process"
|
||||||
pkill -CONT java
|
pkill -CONT java
|
||||||
fi
|
fi
|
||||||
|
|||||||
2
start
2
start
@@ -40,7 +40,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
|
|||||||
echo 'hosts: files dns' > /etc/nsswitch.conf
|
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec su-exec ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@
|
exec gosu ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@
|
||||||
else
|
else
|
||||||
exec ${SCRIPTS:-/}start-configuration $@
|
exec ${SCRIPTS:-/}start-configuration $@
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ fi
|
|||||||
|
|
||||||
if ! which java > /dev/null; then
|
if ! which java > /dev/null; then
|
||||||
log "Fixing PATH to include java"
|
log "Fixing PATH to include java"
|
||||||
PATH="${PATH}:/usr/bin"
|
PATH="${PATH}:/opt/java/openjdk/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||||
@@ -98,6 +98,14 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FORGE)
|
FORGE)
|
||||||
|
if versionLessThan 1.17; then
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||||
|
log " since some mods require Java 8"
|
||||||
|
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||||
|
log " can be fixed with java8"
|
||||||
|
log "**********************************************************************"
|
||||||
|
fi
|
||||||
exec ${SCRIPTS:-/}start-deployForge "$@"
|
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -105,7 +113,17 @@ case "${TYPE^^}" in
|
|||||||
exec ${SCRIPTS:-/}start-deployFabric "$@"
|
exec ${SCRIPTS:-/}start-deployFabric "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
FTBA)
|
||||||
|
exec ${SCRIPTS:-/}start-deployFTBA "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
FTB|CURSEFORGE)
|
FTB|CURSEFORGE)
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||||
|
log " since some mods require Java 8"
|
||||||
|
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||||
|
log " can be fixed with java8"
|
||||||
|
log "**********************************************************************"
|
||||||
exec ${SCRIPTS:-/}start-deployCF "$@"
|
exec ${SCRIPTS:-/}start-deployCF "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -153,11 +171,15 @@ case "${TYPE^^}" in
|
|||||||
exec ${SCRIPTS:-/}start-deployCanyon "$@"
|
exec ${SCRIPTS:-/}start-deployCanyon "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
LIMBO)
|
||||||
|
exec ${SCRIPTS:-/}start-deployLimbo "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log "Invalid type: '$TYPE'"
|
log "Invalid type: '$TYPE'"
|
||||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON"
|
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON, LIMBO"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,6 @@ if ! isTrue ${USE_MODPACK_START_SCRIPT:-true}; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
forgeInstallerJar=$(ls -t "${forgeInstallerJar}" | head -1)
|
|
||||||
|
|
||||||
log "Installing forge server"
|
log "Installing forge server"
|
||||||
dirOfInstaller=$(dirname "${forgeInstallerJar}")
|
dirOfInstaller=$(dirname "${forgeInstallerJar}")
|
||||||
(cd "${dirOfInstaller}"; java -jar $(basename "${forgeInstallerJar}") --installServer)
|
(cd "${dirOfInstaller}"; java -jar $(basename "${forgeInstallerJar}") --installServer)
|
||||||
|
|||||||
@@ -30,7 +30,13 @@ if ! [ -f "${ftbInstallMarker}" ] || [ $(cat "${ftbInstallMarker}") != "${FTB_MO
|
|||||||
ftbInstaller=/data/ftb-installer
|
ftbInstaller=/data/ftb-installer
|
||||||
if ! [[ -f "${ftbInstaller}" ]]; then
|
if ! [[ -f "${ftbInstaller}" ]]; then
|
||||||
log "Downloading FTB installer"
|
log "Downloading FTB installer"
|
||||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
if [ "$(uname -m)" == "aarch64" ]; then
|
||||||
|
log "Downloading ARM installer"
|
||||||
|
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/arm/linux -o "${ftbInstaller}"
|
||||||
|
else
|
||||||
|
log "Downloading x86 installer"
|
||||||
|
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
||||||
|
fi
|
||||||
chmod +x "${ftbInstaller}"
|
chmod +x "${ftbInstaller}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
64
start-deployLimbo
Normal file
64
start-deployLimbo
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
isDebugging && set -x
|
||||||
|
|
||||||
|
: ${LIMBO_BUILD:=LATEST}
|
||||||
|
: ${FORCE_REDOWNLOAD:=false}
|
||||||
|
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
||||||
|
: ${LEVEL:=Default;${LIMBO_SCHEMA_FILENAME}}
|
||||||
|
# defaults to localhost, if this is not set
|
||||||
|
: ${SERVER_IP:=0.0.0.0}
|
||||||
|
|
||||||
|
export LEVEL SERVER_IP
|
||||||
|
|
||||||
|
if [[ ${LIMBO_BUILD^^} == LATEST ]]; then
|
||||||
|
LIMBO_BUILD=lastStableBuild
|
||||||
|
fi
|
||||||
|
|
||||||
|
baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
|
||||||
|
buildInfoUrl="${baseUrl}/api/json"
|
||||||
|
buildJson=$(curl -fsSL "${buildInfoUrl}")
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${LIMBO_BUILD} = lastStableBuild ]]; then
|
||||||
|
LIMBO_BUILD=$(jq -r '.number' <<<${buildJson})
|
||||||
|
log "Resolved latest Limbo build to ${LIMBO_BUILD}"
|
||||||
|
fi
|
||||||
|
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
||||||
|
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
||||||
|
|
||||||
|
export SERVER="limbo-${LIMBO_BUILD}.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
|
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
||||||
|
log "Downloading Limbo from $downloadUrl ..."
|
||||||
|
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||||
|
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
||||||
|
log "Downloading default schem file"
|
||||||
|
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
|
||||||
|
log "ERROR: failed to download schema file $baseUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${LEVEL} != *\;* ]]; then
|
||||||
|
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
||||||
|
fi
|
||||||
|
export LEVEL
|
||||||
|
|
||||||
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
||||||
@@ -154,7 +154,10 @@ fi
|
|||||||
if [[ "${GENERIC_PACK}" ]]; then
|
if [[ "${GENERIC_PACK}" ]]; then
|
||||||
if isURL "${GENERIC_PACK}"; then
|
if isURL "${GENERIC_PACK}"; then
|
||||||
log "Downloading generic pack ..."
|
log "Downloading generic pack ..."
|
||||||
curl -fsSL -o /tmp/generic_pack.zip "${GENERIC_PACK}"
|
if ! curl -fsSL -o /tmp/generic_pack.zip "${GENERIC_PACK}"; then
|
||||||
|
log "ERROR: failed to download ${GENERIC_PACK}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
GENERIC_PACK=/tmp/generic_pack.zip
|
GENERIC_PACK=/tmp/generic_pack.zip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -17,5 +17,4 @@ services:
|
|||||||
- itzg/minecraft-server:latest
|
- itzg/minecraft-server:latest
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
VERSION: "1.16.5"
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user