Don't persist DOCKER_MODS between runs

This commit is contained in:
thespad 2025-01-08 11:43:21 +00:00
parent 475e27002f
commit 0e271350f6
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,10 @@ find_docker_mods() {
}
# Main script loop
# Reset DOCKER_MODS to whatever value the user passed into the container at creation time
DOCKER_MODS="${DOCKER_MODS_STATIC}"
if [[ -e "/var/run/docker.sock" ]] || [[ -n "${DOCKER_HOST}" ]]; then
find_docker_mods "${DOCKER_HOST:-docker.sock}" "default"
fi

View File

@ -17,4 +17,6 @@ fi
echo "[mod-init] Mod updates will run every 6 hours at ${CRON_MINS} minutes past the hour. Next update will be at $(date -d${NEXT_HOUR}:${CRON_MINS} '+%H:%m')."
printf %s "${DOCKER_MODS}" > /run/s6/container_environment/DOCKER_MODS_STATIC
/app/update-mods.sh