7ddf4b2902
Host with systemd-resolved have `/etc/resolv.conf` is a symlink to `/run/systemd/resolve/stub-resolv.conf`. By bind-mounting /etc/resolv.conf only, the exec container DNS resolution fail very badly. This change fixes DNS resolution by binding /run/systemd/resolve as well. Note that this assumes that the systemd resolver (default to 127.0.0.53) is accessible within the container. This is the case here because exec containers share the same network namespace by default. Jobs with custom network dns configurations are not affected, and Nomad will continue to use the job dns settings rather than host one. |
||
---|---|---|
.. | ||
config.go | ||
config_test.go | ||
testing.go |