Compare commits

...
Author SHA1 Message Date
MickLesk e5bc15ea54 NPMplus: hand Docker the usable DNS servers when resolv.conf has a zone ID
The released NPMplus image (2026-11-18-r1) reads /etc/resolv.conf for its nginx resolver and stops with "invalid IPv6 address in resolver" on a link-local server like fe80::1%eth0. NPMplus has no resolver setting; its develop branch already skips such entries. Until that ships, the install writes the other nameservers to compose.yaml as dns.
2026-11-20 17:00:19 +01:00
+5
View File
@@ -68,6 +68,11 @@ yq -i "
(map(select(. != \"TZ=*\" and . != \"ACME_EMAIL=*\" and . != \"INITIAL_ADMIN_EMAIL=*\" and . != \"INITIAL_ADMIN_PASSWORD=*\")) +
[\"TZ=$TZ_INPUT\", \"ACME_EMAIL=$ACME_EMAIL_INPUT\", \"INITIAL_ADMIN_EMAIL=admin@local.com\", \"INITIAL_ADMIN_PASSWORD=${ADMIN_PASS}\"])
" /opt/compose.yaml
# nginx in the NPMplus image cannot parse a link-local resolver with a zone ID (fe80::1%eth0)
DNS_SERVERS="$(awk '/^nameserver/ && $2 !~ /%/ {print $2}' /etc/resolv.conf)"
if grep -qE '^nameserver[[:space:]]+[^[:space:]]*%' /etc/resolv.conf && [[ -n "$DNS_SERVERS" ]]; then
DNS_SERVERS="$DNS_SERVERS" yq -i '.services.npmplus.dns = (strenv(DNS_SERVERS) | split("\n"))' /opt/compose.yaml
fi
{
echo "NPMplus Credentials"
echo "Email: admin@local.com"