I have done the following
Steps to reproduce
sudo container system dns create vm
container system property set dns.domain vm
container run -d --name nginx nginx:latest
curl http://nginx.vm
Problem description
container system dns create vm creates the resolver file as /etc/resolver/containerization.vm instead of /etc/resolver/vm:
$ ls /etc/resolver/
containerization.vm
$ cat /etc/resolver/containerization.vm
domain vm
search vm
nameserver 127.0.0.1
port 2053
macOS dispatches DNS queries based on the resolver filename (resolver(5)), not the domain directive inside the file. A query for nginx.vm matches /etc/resolver/vm — which doesn't exist. The containerization.vm file only catches *.containerization.vm queries.
The container's embedded DNS server works correctly when queried directly:
$ dig @127.0.0.1 -p 2053 nginx.vm
;; ANSWER SECTION:
nginx.vm. 5 IN A 10.0.4.22
The expected behavior is that container system dns create vm creates /etc/resolver/vm, so <name>.vm resolves from the host — matching what docs/tutorial.md describes.
Workaround: sudo cp /etc/resolver/containerization.vm /etc/resolver/vm
If the containerization. prefix is intentional namespacing, the docs should reflect the actual hostname format, or the CLI should also create /etc/resolver/<domain>.
Environment
- OS: macOS 26.4
- Xcode: 26.4
- Container: 0.11.0
Code of Conduct
I have done the following
Steps to reproduce
sudo container system dns create vmcontainer system property set dns.domain vmcontainer run -d --name nginx nginx:latestcurl http://nginx.vmProblem description
container system dns create vmcreates the resolver file as/etc/resolver/containerization.vminstead of/etc/resolver/vm:macOS dispatches DNS queries based on the resolver filename (
resolver(5)), not thedomaindirective inside the file. A query fornginx.vmmatches/etc/resolver/vm— which doesn't exist. Thecontainerization.vmfile only catches*.containerization.vmqueries.The container's embedded DNS server works correctly when queried directly:
The expected behavior is that
container system dns create vmcreates/etc/resolver/vm, so<name>.vmresolves from the host — matching whatdocs/tutorial.mddescribes.Workaround:
sudo cp /etc/resolver/containerization.vm /etc/resolver/vmIf the
containerization.prefix is intentional namespacing, the docs should reflect the actual hostname format, or the CLI should also create/etc/resolver/<domain>.Environment
Code of Conduct