mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
Compare commits
56 Commits
2021.19.0-
...
2021.20.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f24096e584 | ||
|
|
1f2f33d6c0 | ||
|
|
1a3c454d7f | ||
|
|
fa11d313fb | ||
|
|
20bc2a97d9 | ||
|
|
d39f3b0afc | ||
|
|
0cd49c4c81 | ||
|
|
6c1cd2537d | ||
|
|
cf31f24752 | ||
|
|
27523a1c45 | ||
|
|
e1d0fe6b92 | ||
|
|
d3f4a4991e | ||
|
|
296ddbdec5 | ||
|
|
f7cd34b8d8 | ||
|
|
7bafffbd06 | ||
|
|
201ec3be5a | ||
|
|
7d1d5af097 | ||
|
|
f9ce5bce4d | ||
|
|
748768c771 | ||
|
|
f307077636 | ||
|
|
add67113ff | ||
|
|
fe67ee5c79 | ||
|
|
5b777eff5b | ||
|
|
f36dd34f72 | ||
|
|
c4fa657c61 | ||
|
|
bfb0d19372 | ||
|
|
bef6e7b432 | ||
|
|
3263a23140 | ||
|
|
8163e266fe | ||
|
|
349f27f345 | ||
|
|
9b6b813fe8 | ||
|
|
1f39283fd0 | ||
|
|
2086562d03 | ||
|
|
67404c017a | ||
|
|
41e97454a9 | ||
|
|
31d082574d | ||
|
|
0f59ec97b7 | ||
|
|
a1ce1b5a24 | ||
|
|
fb3504ec1a | ||
|
|
b75f83cbf1 | ||
|
|
dc5192e2e7 | ||
|
|
76b5ec75cc | ||
|
|
4663723b84 | ||
|
|
2acb45dc62 | ||
|
|
de42f62031 | ||
|
|
7e690849b6 | ||
|
|
0a1c00f701 | ||
|
|
dc8c9e5d1a | ||
|
|
9577c84d6a | ||
|
|
575197a109 | ||
|
|
2b621b8236 | ||
|
|
14d3446f52 | ||
|
|
83a7481027 | ||
|
|
4c3a329e31 | ||
|
|
6c94e49732 | ||
|
|
af77b29509 |
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/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"
|
||||||
@@ -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
|
||||||
```
|
```
|
||||||
|
|||||||
44
Dockerfile
44
Dockerfile
@@ -1,29 +1,30 @@
|
|||||||
FROM openjdk:8u212-jre-alpine
|
FROM adoptopenjdk:11-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 \
|
iputils-ping \
|
||||||
curl iputils wget \
|
curl 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 +32,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
|
||||||
@@ -59,6 +60,10 @@ 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"]
|
||||||
@@ -69,7 +74,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 +89,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
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -117,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 29 21:26:46 UTC 2021 -->
|
<!-- Added by: runner, at: Thu Sep 16 01:45:44 UTC 2021 -->
|
||||||
|
|
||||||
<!--te-->
|
<!--te-->
|
||||||
|
|
||||||
@@ -271,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.
|
||||||
|
|
||||||
@@ -745,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.
|
||||||
|
|
||||||
@@ -823,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
|
||||||
@@ -968,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"
|
||||||
|
|
||||||
@@ -978,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`
|
||||||
@@ -1264,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:
|
||||||
|
|
||||||
@@ -1323,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:
|
||||||
@@ -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,12 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FORGE)
|
FORGE)
|
||||||
|
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-deployForge "$@"
|
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -105,7 +111,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 "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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