Compare commits
No commits in common. "cf1386628e724b4fac7b7279c8ded4de0812ed6b" and "b0115943c8cfcc1e06ab2cd9bae86ee0c0c70704" have entirely different histories.
cf1386628e
...
b0115943c8
4 changed files with 6 additions and 24 deletions
|
@ -29,7 +29,7 @@ LABEL org.opencontainers.image.licenses="GPL-3.0-only"
|
|||
RUN true
|
||||
RUN nice -20 apk update
|
||||
RUN nice -20 apk upgrade
|
||||
RUN nice -20 apk add bash libstdc++ openjdk21-jre openjdk17-jre openjdk11-jre openjdk8-jre
|
||||
RUN nice -20 apk add bash libstdc++ openjdk21-jre openjdk17-jre openjdk11-jre
|
||||
RUN mkdir /app
|
||||
ADD entrypoint.sh /app/entrypoint.sh
|
||||
COPY --from=builder /builder/bin/rcon /usr/bin/rcon
|
||||
|
|
|
@ -44,13 +44,7 @@ MCSD_MEMORY_MIN=2048M
|
|||
## <= 1.16 | 8
|
||||
## <= 1.16 | 11 (may increase performance)
|
||||
## >= 1.17 | 17
|
||||
## >= 1.20.5 | 21
|
||||
MCSD_JAVA_VERSION=21
|
||||
|
||||
# JAVA_CUSTOM
|
||||
## Set this to 'true' if you want to use a custom JVM
|
||||
## located at './jvm/'. This will update $JAVA_HOME
|
||||
MCSD_JAVA_CUSTOM=false
|
||||
MCSD_JAVA_VERSION=17
|
||||
|
||||
# OPTIMIZED_FLAGS
|
||||
## Applies a modified variant of Aikar's Flags
|
||||
|
|
|
@ -6,7 +6,6 @@ services:
|
|||
stop_grace_period: 120s
|
||||
volumes:
|
||||
- ./server:/data
|
||||
- ./jvm:/jvm
|
||||
env_file:
|
||||
- ./config.env
|
||||
ports:
|
||||
|
|
|
@ -71,15 +71,10 @@ function initialize() {
|
|||
exit 1
|
||||
fi
|
||||
# Java version
|
||||
if [ ! "${MCSD_JAVA_VERSION}" == "21" ] && [ ! "${MCSD_JAVA_VERSION}" == "17" ] && [ ! "${MCSD_JAVA_VERSION}" == "11" ] && [ ! "${MCSD_JAVA_VERSION}" == "8" ]; then
|
||||
if [ ! "${MCSD_JAVA_VERSION}" == "17" ] && [ ! "${MCSD_JAVA_VERSION}" == "11" ] && [ ! "${MCSD_JAVA_VERSION}" == "8" ]; then
|
||||
echo ":: Warning: No/Invalid java version supplied to \$MCSD_JAVA_VERSION, defaulting to java version 17"
|
||||
export "MCSD_JAVA_VERSION=17"
|
||||
fi
|
||||
# Java custom JVM
|
||||
if [ ! "${MCSD_JAVA_CUSTOM}" == "true" ] && [ ! "${MCSD_JAVA_CUSTOM}" == "false" ]; then
|
||||
echo ":: Warning: No/Invalid value supplied to \$MCSD_JAVA_CUSTOM, defaulting to false"
|
||||
export "MCSD_JAVA_CUSTOM=false"
|
||||
fi
|
||||
# Java optimization
|
||||
if [ ! "${MCSD_OPTIMIZED_FLAGS}" == "true" ] && [ ! "${MCSD_OPTIMIZED_FLAGS}" == "false" ]; then
|
||||
echo ":: Warning: No/Invalid value supplied to \$MCSD_OPTIMIZED_FLAGS, defaulting to true"
|
||||
|
@ -140,12 +135,6 @@ function compile_args() {
|
|||
# Compile java flags
|
||||
function compile_flags() {
|
||||
echo ":: Compiling java flags"
|
||||
if [ "${MCSD_JAVA_CUSTOM}" == "true" ]; then
|
||||
export "JAVA_HOME=/jvm"
|
||||
else
|
||||
export "JAVA_HOME=/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk"
|
||||
fi
|
||||
|
||||
export "FLAGS=-Xms${MCSD_MEMORY_MIN} -Xmx${MCSD_MEMORY_MAX}"
|
||||
case "${MCSD_OPTIMIZED_FLAGS}" in
|
||||
"true")
|
||||
|
@ -167,7 +156,7 @@ function compile_flags() {
|
|||
internal_error "\$MCSD_GARBAGECOLLECTOR has invalid value"
|
||||
;;
|
||||
esac
|
||||
if [ "${MCSD_JAVA_VERSION}" == "17" ] || [ "${MCSD_JAVA_VERSION}" == "21" ]; then
|
||||
if [ "${MCSD_JAVA_VERSION}" == "17" ]; then
|
||||
export "FLAGS=${FLAGS} --add-modules=jdk.incubator.vector"
|
||||
fi
|
||||
}
|
||||
|
@ -183,7 +172,7 @@ compile_flags
|
|||
echo ":: Starting server"
|
||||
cd /data||exit 69
|
||||
if [ -z "${MCSD_CUSTOM_ARGS}" ]; then
|
||||
exec "${JAVA_HOME}/bin/java" ${FLAGS} -jar "/data/server.jar" ${ARGS}
|
||||
exec "/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk/bin/java" ${FLAGS} -jar "/data/server.jar" ${ARGS}
|
||||
else
|
||||
exec "${JAVA_HOME}/bin/java" ${MCSD_CUSTOM_ARGS} -jar "/data/server.jar" ${ARGS}
|
||||
exec "/usr/lib/jvm/java-${MCSD_JAVA_VERSION}-openjdk/bin/java" ${MCSD_CUSTOM_ARGS} -jar "/data/server.jar" ${ARGS}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue