mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Compare commits
19 Commits
2021.19.0-
...
1.2.0-open
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3439020ed6 | ||
|
|
503bd86ab6 | ||
|
|
6bd25c20c3 | ||
|
|
480b7645ba | ||
|
|
dd80e5ebd5 | ||
|
|
8164ac05c1 | ||
|
|
70c61aed5c | ||
|
|
3bde06fcfc | ||
|
|
f7eb33b41b | ||
|
|
1f7eafef87 | ||
|
|
0670114602 | ||
|
|
4feec8000b | ||
|
|
e6db79cbbb | ||
|
|
9d97a227f6 | ||
|
|
5d3393d66b | ||
|
|
99c1fc81f1 | ||
|
|
ee97808168 | ||
|
|
2673d1c921 | ||
|
|
9b7d5b35e4 |
@@ -1,4 +1,4 @@
|
||||
FROM openjdk:8u212-jre-alpine
|
||||
FROM adoptopenjdk/openjdk8-openj9:alpine-nightly
|
||||
|
||||
LABEL maintainer "itzg"
|
||||
|
||||
@@ -67,7 +67,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" \
|
||||
|
||||
@@ -1099,6 +1099,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:
|
||||
|
||||
@@ -100,6 +100,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}
|
||||
|
||||
Reference in New Issue
Block a user