mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2026-08-07 19:44:24 +02:00
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>
18 lines
596 B
YAML
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
|