Skip to content

Add TOML configuration for default DNS nameservers, search, options#1614

Open
0xMH wants to merge 2 commits into
apple:mainfrom
0xMH:fix/1449-dns-defaults
Open

Add TOML configuration for default DNS nameservers, search, options#1614
0xMH wants to merge 2 commits into
apple:mainfrom
0xMH:fix/1449-dns-defaults

Conversation

@0xMH
Copy link
Copy Markdown
Contributor

@0xMH 0xMH commented May 28, 2026

Type of Change

  • New feature

Motivation and Context

Closes #1449. Adds default values for --dns, --dns-search, --dns-option, and --dns-domain to the [dns] section of ~/.config/container/config.toml, so users hitting macOS mDNSResponder conflicts can set the workaround once instead of repeating it on every invocation. Depends on the merged TOML configuration introduced by #1425.

Defaults are read by container run, container build, and container builder start via a shared Utility.dnsConfiguration(from:defaults:) helper. CLI flags take precedence; --no-dns still disables DNS. Two pre-existing bugs in the build path were fixed to make the feature work end-to-end: BuildCommand was forwarding only dnsNameservers to the builder (now forwards all four DNS fields), and BuilderStart's dnsChanged check only compared the first non-empty field (now compares all four).

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: system property for default --dns.

1 participant