Compare commits

...

38 Commits

Author SHA1 Message Date
Geoff Bourne
1f0c0f5e17 Auto-merging via docker-versions-create 2021-01-09 11:21:12 -06:00
Dubhar
fdf5fb46bc fix/681 (#719)
* [shellcheck] prevent globbing

* fix/681 remove old PaperMC before downloading new

Fixes #681 

Co-authored-by: Dubhar <thorsten.jerosch@gmail.com>
2021-01-09 11:03:21 -06:00
Geoff Bourne
8c6ca5e999 Restored the ability for PAPERBUILD to be used with TYPE=PAPER
For #715
2021-01-07 20:03:42 -06:00
Geoff Bourne
bb2b9eeea9 docs: Changed FORGEVERSION example to use a valid combination
For #716
2021-01-07 11:02:19 -06:00
Geoff Bourne
d1cbce3f89 docs: Clarified usage of VERSION with FORGE type
For #716
2021-01-06 22:49:22 -06:00
Geoff Bourne
55b5f6821f Fixed ops and white-list setup for CurseForge modpacks named with spaces
For #717
2021-01-06 22:38:18 -06:00
Geoff Bourne
9c626dcc8a Auto-merging via docker-versions-create 2021-01-06 22:03:16 -06:00
Geoff Bourne
c40b658308 Auto-merging via docker-versions-create 2020-12-27 22:05:44 -06:00
Geoff Bourne
6c52ae8ddf Auto-merging via docker-versions-create 2020-12-19 08:24:22 -06:00
Geoff Bourne
d07143153f Auto-merging via docker-versions-create 2020-12-15 13:59:53 -06:00
Geoff Bourne
9efe097193 Auto-merging via docker-versions-create 2020-11-25 15:55:53 -06:00
Geoff Bourne
df95c2e532 Mered .editorconfig 2020-11-25 15:55:23 -06:00
Geoff Bourne
07ab1abc6c Auto-merging via docker-versions-create 2020-08-09 13:06:45 -05:00
Geoff Bourne
cc483bb115 Auto-merging via docker-versions-create 2020-07-26 08:29:35 -05:00
Geoff Bourne
38fffbd39c Auto-merging via docker-versions-create 2020-07-18 18:40:02 -05:00
Geoff Bourne
a196739ed2 Auto-merging via docker-versions-create 2020-07-11 13:13:04 -05:00
Geoff Bourne
87939c3d14 Auto-merging via docker-versions-create 2020-07-10 17:11:06 -05:00
Geoff Bourne
13b2104e84 Auto-merging via docker-versions-create 2020-07-04 14:57:31 -05:00
Geoff Bourne
c6cf39948a Auto-merging via docker-versions-create 2020-06-20 15:44:28 -05:00
Geoff Bourne
3439020ed6 Auto-merging via docker-versions-create 2020-06-19 13:26:25 -05:00
Geoff Bourne
503bd86ab6 Auto-merging via docker-versions-create 2020-05-20 08:14:33 -05:00
Geoff Bourne
6bd25c20c3 Aligned with openj9 branch #521 2020-05-06 16:10:47 -05:00
Geoff Bourne
480b7645ba Auto-merging via docker-versions-create 2020-05-02 09:34:03 -05:00
Geoff Bourne
dd80e5ebd5 Auto-merging via docker-versions-create 2020-04-25 12:10:38 -05:00
Geoff Bourne
8164ac05c1 Auto-merging via docker-versions-create 2020-04-17 21:28:41 -05:00
Geoff Bourne
70c61aed5c Auto-merging via docker-versions-create 2020-04-11 08:51:41 -05:00
Geoff Bourne
3bde06fcfc Auto-merging via docker-versions-create 2020-04-10 11:08:47 -05:00
Geoff Bourne
f7eb33b41b Auto-merging via docker-versions-create 2020-04-03 13:31:35 -05:00
Geoff Bourne
1f7eafef87 Auto-merging via docker-versions-create 2020-04-03 13:28:47 -05:00
Geoff Bourne
0670114602 Auto-merging via docker-versions-create 2020-04-02 17:47:36 -05:00
Geoff Bourne
4feec8000b Auto-merging via docker-versions-create 2020-03-30 08:31:58 -05:00
Geoff Bourne
e6db79cbbb Auto-merging via docker-versions-create 2020-03-26 20:54:07 -05:00
Geoff Bourne
9d97a227f6 Auto-merging via docker-versions-create 2020-02-01 08:52:57 -06:00
Geoff Bourne
5d3393d66b Auto-merging via docker-versions-create 2020-01-17 08:29:08 -06:00
Geoff Bourne
99c1fc81f1 Auto-merging via docker-versions-create 2019-11-16 09:30:57 -06:00
Geoff Bourne
ee97808168 Auto-merging via docker-versions-create 2019-11-16 09:04:21 -06:00
Geoff Bourne
2673d1c921 Merge branch 'master' into openj9-nightly 2019-11-16 09:01:30 -06:00
Geoff Bourne
9b7d5b35e4 Base image on adoptopenjdk/openjdk8-openj9:alpine-nightly 2019-11-02 08:40:48 -05:00
4 changed files with 43 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
FROM openjdk:8u212-jre-alpine
FROM adoptopenjdk/openjdk8-openj9:alpine-nightly
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
@@ -70,7 +70,7 @@ COPY log4j2.xml /tmp/log4j2.xml
WORKDIR /data
ENV UID=1000 GID=1000 \
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
MEMORY="1G" \
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \

View File

@@ -237,12 +237,13 @@ If you're looking for a simple way to deploy this to the Amazon Web Services Clo
## Running a Forge Server
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
By default the container will run the `RECOMMENDED` version of [Forge server](http://www.minecraftforge.net/wiki/)
but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.1448`.
Enable [Forge server](http://www.minecraftforge.net/wiki/) mode by adding a `-e TYPE=FORGE` to your command-line.
The overall version is specified by `VERSION`, [as described in the section above](#versions) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGEVERSION`, such as `-e FORGEVERSION=14.23.5.2854`.
$ docker run -d -v /path/on/host:/data \
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
-e TYPE=FORGE \
-e VERSION=1.12.2 -e FORGEVERSION=14.23.5.2854 \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
To use a pre-downloaded Forge installer, place it in the attached `/data` directory and
@@ -1090,6 +1091,14 @@ via a `JVM_XX_OPTS` environment variable.
For some cases, if e.g. after removing mods, it could be necessary to startup minecraft with an additional `-D` parameter like `-Dfml.queryResult=confirm`. To address this you can use the environment variable `JVM_DD_OPTS`, which builds the params from a given list of values separated by space, but without the `-D` prefix. To make things running under systems (e.g. Plesk), which doesn't allow `=` inside values, a `:` (colon) could be used instead. The upper example would look like this:
`JVM_DD_OPTS=fml.queryResult:confirm`, and will be converted to `-Dfml.queryResult=confirm`.
The container uses [OpenJ9](https://www.eclipse.org/openj9/docs) and a couple of J9 options are
simplified by environment variables:
- `-e TUNE_VIRTUALIZED=TRUE` : enables the option to
[optimize for virtualized environments](https://www.eclipse.org/openj9/docs/xtunevirtualized/)
- `-e TUNE_NURSERY_SIZES=TRUE` : configures nursery sizes where the initial size is 50%
of the `MAX_MEMORY` and the max size is 80%.
### Enable Remote JMX for Profiling
To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable `ENABLE_JMX=true` and add a port forwarding of TCP port 7091, such as:

View File

@@ -17,8 +17,8 @@ if [[ $PAPER_DOWNLOAD_URL ]]; then
else
# PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config
build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
| jq '.builds[-1]')
build=${PAPERBUILD:=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
| jq '.builds[-1]')}
case $? in
0)
;;
@@ -28,7 +28,7 @@ else
VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]')
log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC"
# re-execute the current script with the newly computed version
exec $0 "$@"
exec "$0" "$@"
fi
log "ERROR: ${VANILLA_VERSION} is not published by PaperMC"
log " Set VERSION to one of the following: "
@@ -56,6 +56,10 @@ else
zarg=(-z "$SERVER")
fi
log "Removing old PaperMC versions ..."
paperJarSearchString=${SERVER/$build/[0-9]*}
find . -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
curl -fsSL -o "$SERVER" "${zarg[@]}" \
"https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \
@@ -71,4 +75,4 @@ export TYPE=SPIGOT
export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup
exec ${SCRIPTS:-/}start-finalSetupWorld $@
exec ${SCRIPTS:-/}start-finalSetupWorld "$@"

View File

@@ -71,6 +71,23 @@ if [ -n "$JVM_DD_OPTS" ]; then
done
fi
if isTrue ${TUNE_VIRTUALIZED}; then
JVM_XX_OPTS="${JVM_XX_OPTS} -Xtune:virtualized"
fi
if isTrue ${TUNE_NURSERY_SIZES}; then
case ${MAX_MEMORY^^} in
*G)
MAX_MEMORY_MB=$(( ${MAX_MEMORY%?} * 1024 )) ;;
*M)
MAX_MEMORY_MB=${MAX_MEMORY%?} ;;
esac
NURSERY_MINIMUM=$(( ${MAX_MEMORY_MB} / 2 ))
NURSERY_MAXIMUM=$(( ${MAX_MEMORY_MB} * 4/5 ))
JVM_XX_OPTS="${JVM_XX_OPTS} -Xmns${NURSERY_MINIMUM}M -Xmnx${NURSERY_MAXIMUM}M"
fi
if isTrue ${ENABLE_JMX}; then
: ${JMX_HOST:=0.0.0.0}
: ${JMX_PORT:=7091}
@@ -146,11 +163,11 @@ JVM_OPTS="-Xms${INIT_MEMORY} -Xmx${MAX_MEMORY} ${JVM_OPTS}"
function copyFilesForCurseForge() {
# copy player modification files unconditionally since their
# processing into json is additive anyway
[ -f /data/ops.txt ] && cp -f /data/ops.txt ${FTB_DIR}/
[ -f /data/white-list.txt ] && cp -f /data/white-list.txt ${FTB_DIR}/
[ -f /data/ops.txt ] && cp -f /data/ops.txt "${FTB_DIR}/"
[ -f /data/white-list.txt ] && cp -f /data/white-list.txt "${FTB_DIR}/"
if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then
cp -f /data/server-icon.png ${FTB_DIR}/
cp -f /data/server-icon.png "${FTB_DIR}/"
fi
cp -f /data/eula.txt "${FTB_DIR}/"