mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
feat(minecraft-server): add server-name to env variables
The server-name (e.g. needed for bungeecord) can now be set via the env variable SERVER_NAME. Defaults to Unknown
This commit is contained in:
parent
bd084cc261
commit
f6465b5dac
@ -3,19 +3,19 @@ FROM openjdk:8u171-jre-alpine
|
||||
LABEL maintainer "itzg"
|
||||
|
||||
RUN apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
lsof \
|
||||
su-exec \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils wget \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
python python-dev py2-pip
|
||||
openssl \
|
||||
imagemagick \
|
||||
lsof \
|
||||
su-exec \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils wget \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
python python-dev py2-pip
|
||||
|
||||
RUN pip install mcstatus
|
||||
|
||||
@ -71,7 +71,7 @@ ENV UID=1000 GID=1000 \
|
||||
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= LEVEL=world \
|
||||
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= MODS= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true
|
||||
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= MODS= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true SERVER_NAME=Unknown
|
||||
|
||||
COPY start* /
|
||||
RUN dos2unix /start* && chmod +x /start*
|
||||
|
@ -435,6 +435,11 @@ this server instance.
|
||||
|
||||
## Server configuration
|
||||
|
||||
### Server name
|
||||
|
||||
The server name (e.g. for bungeecord) can be set like:
|
||||
docker run -d -e SERVER_NAME=MyServer ...
|
||||
|
||||
### Server port
|
||||
|
||||
The server port can be set like:
|
||||
|
@ -50,6 +50,7 @@ if [ ! -e $SERVER_PROPERTIES ]; then
|
||||
MOTD="A ${label} Minecraft Server powered by Docker"
|
||||
fi
|
||||
|
||||
setServerProp "server-name" "$SERVER_NAME"
|
||||
setServerProp "server-port" "$SERVER_PORT"
|
||||
setServerProp "motd" "$MOTD"
|
||||
setServerProp "allow-nether" "$ALLOW_NETHER"
|
||||
|
Loading…
Reference in New Issue
Block a user