mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 06:12:27 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
commit
faa7553e54
11 changed files with 70 additions and 34 deletions
1
.github/workflows/stale-check.yml
vendored
1
.github/workflows/stale-check.yml
vendored
|
@ -1,7 +1,6 @@
|
|||
name: Stale Check
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
schedule:
|
||||
- cron: 0 2 * * *
|
||||
|
||||
|
|
|
@ -95,3 +95,25 @@ The following git command can be used to provide the bulk of release notes conte
|
|||
```shell script
|
||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="* %s" 1.1.0..1.2.0
|
||||
```
|
||||
## Tracking changes from master without content
|
||||
|
||||
The following script uses the [ours](https://git-scm.com/docs/merge-strategies#Documentation/merge-strategies.txt-ours) merging strategy to track the history from master into the other branches without actually bringing the changes over. It is useful when a change is specific to master only, such as bumping the base Java version for the `latest` image tag.
|
||||
|
||||
```shell
|
||||
branches=(
|
||||
java8
|
||||
java8-multiarch
|
||||
java8-openj9
|
||||
java11
|
||||
java11-openj9
|
||||
java16
|
||||
java16-openj9
|
||||
java17
|
||||
)
|
||||
|
||||
for b in "${branches[@]}"; do
|
||||
git checkout "$b"
|
||||
git merge -s ours -m "Track latest from master" master
|
||||
git push origin
|
||||
done
|
||||
```
|
|
@ -49,7 +49,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=0.10.1 --var app=mc-monitor --file {{.app}} \
|
||||
--var version=0.10.3 --var app=mc-monitor --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} \
|
||||
|
@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||
--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
|
||||
|
||||
ARG MC_HELPER_VERSION=1.9.6
|
||||
ARG MC_HELPER_VERSION=1.9.10
|
||||
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}
|
||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
| tar -C /usr/share -zxf - \
|
||||
|
|
16
README.md
16
README.md
|
@ -48,7 +48,7 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||
* [Running a Magma server](#running-a-magma-server)
|
||||
* [Running a Mohist server](#running-a-mohist-server)
|
||||
* [Running a Catserver type server](#running-a-catserver-type-server)
|
||||
* [Running an Canyon server](#running-an-canyon-server)
|
||||
* [Running a Canyon server](#running-a-canyon-server)
|
||||
* [Running a SpongeVanilla server](#running-a-spongevanilla-server)
|
||||
* [Running a Fabric Server](#running-a-fabric-server)
|
||||
* [Running a Limbo server](#running-a-limbo-server)
|
||||
|
@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||
* [Running on RaspberryPi](#running-on-raspberrypi)
|
||||
* [Contributing](#contributing)
|
||||
|
||||
<!-- Added by: runner, at: Tue Nov 16 02:46:53 UTC 2021 -->
|
||||
<!-- Added by: runner, at: Tue Nov 23 02:51:46 UTC 2021 -->
|
||||
|
||||
<!--te-->
|
||||
|
||||
|
@ -280,7 +280,6 @@ To use a different version of Java, please use a docker tag to run your Minecraf
|
|||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java11 | 11 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
| java11-openj9 | 11 | Debian | OpenJ9 | amd64 |
|
||||
| java16 | 16 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
| java16-openj9 | 16 | Debian | OpenJ9 | amd64 |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64,arm64,armv7 |
|
||||
|
||||
|
@ -298,6 +297,7 @@ The following image tags have been deprecated and are no longer receiving update
|
|||
- adopt15
|
||||
- openj9-nightly
|
||||
- multiarch-latest
|
||||
- java16
|
||||
|
||||
## Healthcheck
|
||||
|
||||
|
@ -502,17 +502,15 @@ A [Catserver](http://catserver.moe/) type server can be used with
|
|||
|
||||
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored
|
||||
|
||||
### Running an Canyon server
|
||||
### Running a Canyon server
|
||||
|
||||
[Canyon](https://github.com/canyonmodded/canyon) is a fork of CraftBukkit for Minecraft Beta 1.7.3. It includes multiple enhancements whilst also retaining compatibility with old Bukkit plugins and mods as much as possible.
|
||||
|
||||
-e VERSION=b1.7.3 -e TYPE=CANYON
|
||||
|
||||
> **NOTE** only `VERSION=b1.7.3` is supported
|
||||
> **NOTE** only `VERSION=b1.7.3` is supported. Since that version pre-dates the health check mechanism used by this image, that will need to be disabled by setting `DISABLE_HEALTHCHECK=true`.
|
||||
|
||||
> **NOTE** only Java 8 is supported
|
||||
|
||||
By default the latest build will be used; however, a specific build number can be selected by setting `CANYON_BUILD`, such as
|
||||
By default, the latest build will be used; however, a specific build number can be selected by setting `CANYON_BUILD`, such as
|
||||
|
||||
-e CANYON_BUILD=11
|
||||
|
||||
|
@ -1371,7 +1369,7 @@ To enable remote JMX, such as for profiling with VisualVM or JMC, add the enviro
|
|||
|
||||
### Enable Aikar's Flags
|
||||
|
||||
[Aikar has does some research](https://mcflags.emc.gs/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using
|
||||
[Aikar has does some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using
|
||||
|
||||
-e USE_AIKAR_FLAGS=true
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
# shellcheck source=../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if [ -f /data/.mc-health.env ]; then
|
||||
. /data/.mc-health.env
|
||||
fi
|
||||
|
||||
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
||||
echo "Healthcheck disabled"
|
||||
|
@ -10,6 +13,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
|
|||
echo "Java process suspended by Autopause function"
|
||||
exit 0
|
||||
else
|
||||
mc-monitor status --host localhost --port "${SERVER_PORT:-25565}"
|
||||
mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "${SERVER_PORT:-25565}"
|
||||
exit $?
|
||||
fi
|
||||
|
|
|
@ -7,7 +7,6 @@ branches_list=(
|
|||
'java8-openj9'
|
||||
'java11'
|
||||
'java11-openj9'
|
||||
'java16'
|
||||
'java16-openj9'
|
||||
'java17'
|
||||
)
|
||||
|
|
|
@ -3,18 +3,18 @@ apiVersion: apps/v1
|
|||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: example
|
||||
name: example
|
||||
app: mc-example
|
||||
name: mc-example
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: example
|
||||
serviceName: mc-example
|
||||
selector:
|
||||
matchLabels:
|
||||
app: example
|
||||
app: mc-example
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: example
|
||||
app: mc-example
|
||||
spec:
|
||||
containers:
|
||||
- name: mc
|
||||
|
@ -25,6 +25,18 @@ spec:
|
|||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mc-monitor
|
||||
- status
|
||||
- --host
|
||||
- localhost
|
||||
- --port
|
||||
- "25565"
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 5
|
||||
failureThreshold: 18
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
|
@ -39,12 +51,12 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
service: example
|
||||
name: example
|
||||
service: mc-example
|
||||
name: mc-example
|
||||
spec:
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
selector:
|
||||
app: example
|
||||
type: LoadBalancer
|
||||
app: mc-example
|
||||
type: NodePort
|
||||
|
|
|
@ -92,6 +92,14 @@ if isTrue "${ENABLE_AUTOPAUSE}"; then
|
|||
${SCRIPTS:-/}start-autopause
|
||||
fi
|
||||
|
||||
if versionLessThan 1.7; then
|
||||
echo "
|
||||
MC_HEALTH_EXTRA_ARGS=(
|
||||
--use-server-list-ping
|
||||
)
|
||||
" > /data/.mc-health.env
|
||||
fi
|
||||
|
||||
log "Resolving type given ${TYPE}"
|
||||
case "${TYPE^^}" in
|
||||
*BUKKIT|SPIGOT)
|
||||
|
|
|
@ -2,16 +2,11 @@
|
|||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: ${CANYON_BUILD:=lastSuccessfulBuild}
|
||||
JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
|
||||
|
||||
if [ "${JAVA_VER}" != "8" ]; then
|
||||
log "ERROR: Canyon server type only supports Java version 8"
|
||||
exit 1
|
||||
fi
|
||||
: "${CANYON_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
if [ "${VERSION}" != "b1.7.3" ]; then
|
||||
log "ERROR: Canyon server type only supports VERSION=b1.7.3"
|
||||
|
|
|
@ -67,7 +67,7 @@ variants=(
|
|||
forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar
|
||||
fabric-${mcVersion}-${fabricVersion}-server-launch.jar
|
||||
)
|
||||
for f in ${variants[@]}; do
|
||||
for f in "${variants[@]}"; do
|
||||
if [ -f $f ]; then
|
||||
export SERVER=$f
|
||||
break
|
||||
|
|
|
@ -11,8 +11,8 @@ get_installer() {
|
|||
log "Downloading $normForgeVersion"
|
||||
|
||||
forgeFileNames="
|
||||
$normForgeVersion/forge-$normForgeVersion-installer.jar
|
||||
$shortForgeVersion/forge-$shortForgeVersion-installer.jar
|
||||
$normForgeVersion/forge-$normForgeVersion-installer.jar
|
||||
"
|
||||
|
||||
for fn in $forgeFileNames; do
|
||||
|
@ -102,7 +102,7 @@ resolve_versions() {
|
|||
;;
|
||||
|
||||
RECOMMENDED)
|
||||
if ! FORGE_VERSION=$(get --json-path ".promos['$VANILLA_VERSION-recommended']" "$promosUrl"); then
|
||||
if ! FORGE_VERSION=$(get -s --json-path ".promos['$VANILLA_VERSION-recommended']" "$promosUrl"); then
|
||||
if ! FORGE_VERSION=$(get --json-path ".promos['$VANILLA_VERSION-latest']" "$promosUrl"); then
|
||||
log "ERROR: Version $VANILLA_VERSION is not supported by Forge"
|
||||
log " Refer to http://files.minecraftforge.net/ for supported versions"
|
||||
|
|
Loading…
Reference in a new issue