mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-05 01:49:16 +00:00
Directly attach stdin of server process by default (#2605)
This commit is contained in:
parent
5729324195
commit
ca393c4fcf
3 changed files with 9 additions and 2 deletions
|
@ -44,7 +44,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.10.0
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.11.0
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
. "/start-utils"
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
echo "ERROR: console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
|
||||
fi
|
||||
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "ERROR: pass console commands as arguments"
|
||||
exit 1
|
||||
|
|
|
@ -231,8 +231,10 @@ fi
|
|||
|
||||
mcServerRunnerArgs=(
|
||||
--stop-duration "${STOP_DURATION:-60}s"
|
||||
--named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
|
||||
)
|
||||
if isTrue "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
mcServerRunnerArgs+=(--named-pipe "${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}")
|
||||
fi
|
||||
if [[ ${STOP_SERVER_ANNOUNCE_DELAY} ]]; then
|
||||
mcServerRunnerArgs+=(--stop-server-announce-delay "${STOP_SERVER_ANNOUNCE_DELAY}s")
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue