Files
JamBalaya56562andClaude Opus 4.8 d0129d48a2 fix: respect user-provided RESOLVERS env var (#2699)
The entrypoint's _resolvers() unconditionally recomputed RESOLVERS from
/etc/resolv.conf and exported it, overwriting any value the user set via
the environment — contradicting the documented "no default value" behavior.

Now _resolvers() honors a user-provided RESOLVERS and only autodetects from
/etc/resolv.conf when it is unset/empty. Adds a "Custom DNS Resolvers" docs
section and an integration test covering both the honored and autodetected
cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 22:22:37 +09:00

18 lines
596 B
YAML

services:
# Proxy with a user-provided RESOLVERS value: it must be honored as-is.
resolvers-custom:
image: nginxproxy/nginx-proxy:test
container_name: resolvers-custom
environment:
RESOLVERS: 8.8.8.8
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
# Proxy without RESOLVERS: the entrypoint must autodetect from /etc/resolv.conf
# (Docker's embedded DNS server, 127.0.0.11, on a user-defined network).
resolvers-auto:
image: nginxproxy/nginx-proxy:test
container_name: resolvers-auto
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro