Skip to content

[Bug]: Wrong DNS resolver filename theory — not a bug, closed #1407

@x8x

Description

@x8x

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

  1. sudo container system dns create vm
  2. container system property set dns.domain vm
  3. container run -d --name nginx nginx:latest
  4. 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 agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions