From 7fe09ebba96bc43d471e6db6497bc74555599639 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 10 Aug 2025 13:10:31 -0600 Subject: [PATCH] allow env in motd --- context/Dockerfile | 1 + context/run-server | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/context/Dockerfile b/context/Dockerfile index c7e3266..0edb208 100644 --- a/context/Dockerfile +++ b/context/Dockerfile @@ -16,6 +16,7 @@ RUN go install github.com/a8m/envsubst/cmd/envsubst@latest FROM base AS package ARG MINECRAFT_VERSION="1.20.6" +ENV MINECRAFT_VERSION $MINECRAFT_VERSION RUN apk add --no-cache --upgrade rcon eudev-libs WORKDIR / diff --git a/context/run-server b/context/run-server index 20549b5..7a4c4e8 100755 --- a/context/run-server +++ b/context/run-server @@ -1,5 +1,6 @@ #!/bin/sh -export MINECRAFT_VERSION=SED_VERSION +# add environment variables to motd +export MC_MOTD=$(echo $MC_MOTD | envsubst) cleanup() { rcon -m -p 25575 --host localhost --password "${MC_RCON_PASSWORD}" say Warning! Server is shutting down in 5 seconds...