mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
93 Commits
java7
...
2021.20.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
551e4d6346 | ||
|
|
1f2f33d6c0 | ||
|
|
1a3c454d7f | ||
|
|
fa11d313fb | ||
|
|
20bc2a97d9 | ||
|
|
61a660ee48 | ||
|
|
0cd49c4c81 | ||
|
|
6c1cd2537d | ||
|
|
cf31f24752 | ||
|
|
27523a1c45 | ||
|
|
e1d0fe6b92 | ||
|
|
d3f4a4991e | ||
|
|
296ddbdec5 | ||
|
|
f7cd34b8d8 | ||
|
|
7bafffbd06 | ||
|
|
201ec3be5a | ||
|
|
7d1d5af097 | ||
|
|
f9ce5bce4d | ||
|
|
748768c771 | ||
|
|
f307077636 | ||
|
|
5e9806736c | ||
|
|
179cd878a9 | ||
|
|
788548d1f4 | ||
|
|
0ae15c2b3c | ||
|
|
b5b4257032 | ||
|
|
657db124b2 | ||
|
|
f5ea43b3d3 | ||
|
|
01747510d5 | ||
|
|
ff8b160a2b | ||
|
|
d5865cd60c | ||
|
|
2b0b8f8a62 | ||
|
|
e94b40bddf | ||
|
|
2dabf34349 | ||
|
|
eb864c0fb8 | ||
|
|
2e0f469748 | ||
|
|
aa95dc291b | ||
|
|
d22280fae7 | ||
|
|
aac3c1c77a | ||
|
|
61b0eff4ca | ||
|
|
8c5f0a53bf | ||
|
|
fffeb7bb9c | ||
|
|
a060cc88d1 | ||
|
|
4421aaa22d | ||
|
|
3a51db6d24 | ||
|
|
969a23ae27 | ||
|
|
1a62592fe2 | ||
|
|
c316dbb5d2 | ||
|
|
bb64135c9b | ||
|
|
ef98de154c | ||
|
|
3d00077ef8 | ||
|
|
0d3ab75683 | ||
|
|
87681e64bb | ||
|
|
8ce986d3d7 | ||
|
|
67fda61de4 | ||
|
|
7c6ec41822 | ||
|
|
93af2025a2 | ||
|
|
c1b040af77 | ||
|
|
4148325787 | ||
|
|
7083cd15e8 | ||
|
|
7418dab476 | ||
|
|
94bbc8e649 | ||
|
|
3e5e62229a | ||
|
|
fe2a9d56ed | ||
|
|
27571999b2 | ||
|
|
bbd7d9e39a | ||
|
|
ef6f308229 | ||
|
|
49d89d3e73 | ||
|
|
74203b23f4 | ||
|
|
4fb791b490 | ||
|
|
ced25ad50a | ||
|
|
48efc224ba | ||
|
|
467c1d9954 | ||
|
|
9ced230f55 | ||
|
|
f3a8276362 | ||
|
|
b91d63716e | ||
|
|
46cccfd531 | ||
|
|
9fe1cb4a0d | ||
|
|
076038b470 | ||
|
|
aa416729ea | ||
|
|
812c6365ec | ||
|
|
42a5131b19 | ||
|
|
624f6a210f | ||
|
|
1c63cd18b7 | ||
|
|
6266a7e3cc | ||
|
|
871ecd4d9d | ||
|
|
c572c95161 | ||
|
|
f7b58fbbb1 | ||
|
|
eccfa444a9 | ||
|
|
e831d25706 | ||
|
|
12e931332b | ||
|
|
ceee9eddc9 | ||
|
|
60ba668743 | ||
|
|
fd1b15e01f |
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
custom:
|
||||||
|
- https://www.buymeacoffee.com/itzg
|
||||||
|
- https://paypal.me/itzg
|
||||||
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/generate-toc.yml
vendored
2
.github/workflows/generate-toc.yml
vendored
@@ -16,6 +16,6 @@ jobs:
|
|||||||
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
|
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
|
||||||
chmod a+x gh-md-toc
|
chmod a+x gh-md-toc
|
||||||
./gh-md-toc --insert --no-backup README.md
|
./gh-md-toc --insert --no-backup README.md
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.11.0
|
- uses: stefanzweifel/git-auto-commit-action@v4.12.0
|
||||||
with:
|
with:
|
||||||
commit_message: "docs: Auto update markdown TOC"
|
commit_message: "docs: Auto update markdown TOC"
|
||||||
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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM adoptopenjdk:16-jre
|
FROM adoptopenjdk:8-jre-hotspot
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@ RUN apt-get update \
|
|||||||
gosu \
|
gosu \
|
||||||
sudo \
|
sudo \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
iputils-ping \
|
||||||
curl wget \
|
curl wget \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
@@ -52,13 +53,17 @@ 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} \
|
||||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
--var version=0.1.1 --var app=maven-metadata-release --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
|
||||||
|
|
||||||
|
ARG ASCIIFY_VERSION=1.0.1
|
||||||
|
ADD https://jitpack.io/com/github/itzg/asciify/${ASCIIFY_VERSION}/asciify-${ASCIIFY_VERSION}.jar /usr/share/asciify/asciify.jar
|
||||||
|
RUN chmod -R a+r /usr/share/asciify
|
||||||
|
|
||||||
COPY mcstatus /usr/local/bin
|
COPY mcstatus /usr/local/bin
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|||||||
44
README.md
44
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)
|
||||||
@@ -116,19 +117,20 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||||||
* [Server Shutdown Options](#server-shutdown-options)
|
* [Server Shutdown Options](#server-shutdown-options)
|
||||||
* [OpenJ9 Specific Options](#openj9-specific-options)
|
* [OpenJ9 Specific Options](#openj9-specific-options)
|
||||||
* [Enabling rolling logs](#enabling-rolling-logs)
|
* [Enabling rolling logs](#enabling-rolling-logs)
|
||||||
* [Timezone Configuration](#timezone-configuration)
|
* [Timezone Configuration](#timezone-configuration)
|
||||||
* [Enable Remote JMX for Profiling](#enable-remote-jmx-for-profiling)
|
* [Enable Remote JMX for Profiling](#enable-remote-jmx-for-profiling)
|
||||||
* [Enable Aikar's Flags](#enable-aikars-flags)
|
* [Enable Aikar's Flags](#enable-aikars-flags)
|
||||||
* [HTTP Proxy](#http-proxy)
|
* [HTTP Proxy](#http-proxy)
|
||||||
* [Using "noconsole" option](#using-noconsole-option)
|
* [Using "noconsole" option](#using-noconsole-option)
|
||||||
* [Explicitly disable GUI](#explicitly-disable-gui)
|
* [Explicitly disable GUI](#explicitly-disable-gui)
|
||||||
* [Stop Duration](#stop-duration)
|
* [Stop Duration](#stop-duration)
|
||||||
|
* [Setup only](#setup-only)
|
||||||
* [Autopause](#autopause)
|
* [Autopause](#autopause)
|
||||||
* [Description](#description)
|
* [Description](#description)
|
||||||
* [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 15 17:44:45 UTC 2021 -->
|
<!-- Added by: runner, at: Thu Sep 16 01:45:44 UTC 2021 -->
|
||||||
|
|
||||||
<!--te-->
|
<!--te-->
|
||||||
|
|
||||||
@@ -270,9 +272,9 @@ To use a different version of Java, please use a docker tag to run your Minecraf
|
|||||||
| java16-openj9 | 16 | Debian | OpenJ9 | amd64 |
|
| java16-openj9 | 16 | Debian | OpenJ9 | amd64 |
|
||||||
| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 |
|
| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
|
|
||||||
For example, to use Java version 15 on any supported architecture:
|
For example, to use Java version 16 on any supported architecture:
|
||||||
|
|
||||||
docker run --name mc itzg/minecraft-server:java15
|
docker run --name mc itzg/minecraft-server:java16
|
||||||
|
|
||||||
> Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation.
|
> Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation.
|
||||||
|
|
||||||
@@ -350,6 +352,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
|
||||||
@@ -736,6 +746,10 @@ read-only volume attachment to ensure the clone source remains pristine.
|
|||||||
docker run ... -v $HOME/worlds:/worlds:ro -e WORLD=/worlds/basic
|
docker run ... -v $HOME/worlds:/worlds:ro -e WORLD=/worlds/basic
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The following diagram shows how this option can be used in a compose deployment with a relative directory:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Overwrite world on start
|
### Overwrite world on start
|
||||||
The world will only be downloaded or copied if it doesn't exist already. Set `FORCE_WORLD_COPY=TRUE` to force overwrite the world on every server start.
|
The world will only be downloaded or copied if it doesn't exist already. Set `FORCE_WORLD_COPY=TRUE` to force overwrite the world on every server start.
|
||||||
|
|
||||||
@@ -814,7 +828,7 @@ The server icon which has been set doesn't get overridden by default. It can be
|
|||||||
|
|
||||||
### Rcon
|
### Rcon
|
||||||
|
|
||||||
To use rcon use the `ENABLE_RCON` and `RCON_PASSORD` variables.
|
To use rcon use the `ENABLE_RCON` and `RCON_PASSWORD` variables.
|
||||||
By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable.
|
By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable.
|
||||||
|
|
||||||
docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing
|
docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing
|
||||||
@@ -959,7 +973,7 @@ For example:
|
|||||||
|
|
||||||
### Message of the Day
|
### Message of the Day
|
||||||
|
|
||||||
The message of the day, shown below each server entry in the UI, can be changed with the `MOTD` environment variable, such as
|
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as
|
||||||
|
|
||||||
-e MOTD="My Server"
|
-e MOTD="My Server"
|
||||||
|
|
||||||
@@ -969,6 +983,14 @@ If you leave it off, a default is computed from the server type and version, suc
|
|||||||
|
|
||||||
That way you can easily differentiate between several servers you may have started.
|
That way you can easily differentiate between several servers you may have started.
|
||||||
|
|
||||||
|
The section symbol (§) and other unicode characters are automatically converted to allow [formatting codes](https://minecraft.fandom.com/wiki/Formatting_codes) to be used consistently with all server versions. For example,
|
||||||
|
|
||||||
|
-e MOTD="A §l§cMinecraft§r §nserver"
|
||||||
|
|
||||||
|
renders
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### PVP Mode
|
### PVP Mode
|
||||||
|
|
||||||
By default, servers are created with player-vs-player (PVP) mode enabled. You can disable this with the `PVP`
|
By default, servers are created with player-vs-player (PVP) mode enabled. You can disable this with the `PVP`
|
||||||
@@ -1000,6 +1022,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:
|
||||||
@@ -1251,7 +1277,7 @@ By default the vanilla log file will grow without limit. The logger can be recon
|
|||||||
|
|
||||||
> **NOTE** this will interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
|
> **NOTE** this will interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
|
||||||
|
|
||||||
## Timezone Configuration
|
### Timezone Configuration
|
||||||
|
|
||||||
You can configure the timezone to match yours by setting the `TZ` environment variable:
|
You can configure the timezone to match yours by setting the `TZ` environment variable:
|
||||||
|
|
||||||
@@ -1310,6 +1336,10 @@ disable that by passing `-e GUI=FALSE`.
|
|||||||
|
|
||||||
When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds.
|
When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds.
|
||||||
|
|
||||||
|
### Setup only
|
||||||
|
|
||||||
|
If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`.
|
||||||
|
|
||||||
## Autopause
|
## Autopause
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|||||||
BIN
docs/motd-example.png
Normal file
BIN
docs/motd-example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 985 B |
27
examples/docker-compose-rlcraft.yml
Normal file
27
examples/docker-compose-rlcraft.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
rlcraft:
|
||||||
|
image: itzg/minecraft-server:java8
|
||||||
|
container_name: rlcraft
|
||||||
|
volumes:
|
||||||
|
- rlcraft-modpack:/modpacks:ro
|
||||||
|
- rlcraft-data:/data
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
TYPE: "FORGE"
|
||||||
|
VERSION: "1.12.2"
|
||||||
|
FORGEVERSION: "14.23.5.2855"
|
||||||
|
DIFFICULTY: "hard"
|
||||||
|
MAX_TICK_TIME: "-1"
|
||||||
|
VIEW_DISTANCE: "6"
|
||||||
|
ALLOW_FLIGHT: "true"
|
||||||
|
MEMORY: "4G"
|
||||||
|
GENERIC_PACK: "/modpacks/RLCraft_Server_Pack_1.12.2_Beta_v2.8.2.zip"
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
rlcraft-data:
|
||||||
|
rlcraft-modpack:
|
||||||
@@ -98,14 +98,6 @@ 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 "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -118,12 +110,6 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
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 "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ isDebugging && set -x
|
|||||||
: ${FORCE_REDOWNLOAD:=false}
|
: ${FORCE_REDOWNLOAD:=false}
|
||||||
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
||||||
: ${LEVEL:=Default;${LIMBO_SCHEMA_FILENAME}}
|
: ${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
|
if [[ ${LIMBO_BUILD^^} == LATEST ]]; then
|
||||||
LIMBO_BUILD=lastStableBuild
|
LIMBO_BUILD=lastStableBuild
|
||||||
@@ -22,11 +26,14 @@ if [ $? != 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PURPUR_BUILD=$(jq -r '.number' <<<${buildJson})
|
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})
|
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
||||||
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
||||||
|
|
||||||
export SERVER="purpur-${PURPUR_BUILD}.jar"
|
export SERVER="limbo-${LIMBO_BUILD}.jar"
|
||||||
|
|
||||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
||||||
@@ -46,7 +53,7 @@ if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${LEVEL} != "*;*" ]]; then
|
if [[ ${LEVEL} != *\;* ]]; then
|
||||||
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
||||||
fi
|
fi
|
||||||
export LEVEL
|
export LEVEL
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ function customizeServerProps {
|
|||||||
setServerProp "server-name" "$SERVER_NAME"
|
setServerProp "server-name" "$SERVER_NAME"
|
||||||
setServerProp "server-ip" "$SERVER_IP"
|
setServerProp "server-ip" "$SERVER_IP"
|
||||||
setServerProp "server-port" "$SERVER_PORT"
|
setServerProp "server-port" "$SERVER_PORT"
|
||||||
setServerProp "motd" "$MOTD"
|
setServerProp "motd" "$(echo $MOTD | java -jar /usr/share/asciify/asciify.jar)"
|
||||||
setServerProp "allow-nether" "$ALLOW_NETHER"
|
setServerProp "allow-nether" "$ALLOW_NETHER"
|
||||||
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
|
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
|
||||||
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
|
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
|
||||||
|
|||||||
Reference in New Issue
Block a user