weaveworks / footloose

Container Machines - Containers that look like Virtual Machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How DNS works in footloose powered container VMs?

brightzheng100 opened this issue · comments

I'm seeing the /etc/resolv.conf has contents like:

root@ubuntu-0:~# cat /etc/resolv.conf
nameserver 127.0.0.11
options ndots:0

While digging into the Docker network, it's like:

[
    {
        "Name": "footloose-cluster",
        "Id": "e7bfd1b3d6e6e1bc029700c10f14fc8bc24f8206f1db45fad5b982625c3d3efd",
        "Created": "2021-06-28T10:41:41.139799677Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "82fcc8b066eaf77887964cf76584e03a82e82f2aae6c6fcb314fbc8ee14fca5b": {
                "Name": "sandbox-ubuntu-1",
                "EndpointID": "d89558f421709950fa5583c441401e3bb9af06989f0302819ad7677f050076d9",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "886f66de2c6ec5d8201a72477fc151ae495c57db6825b2dc51ced3b14b5dd4da": {
                "Name": "sandbox-ubuntu-2",
                "EndpointID": "13a0b3c313a91500ad81e91baa2f0397933b3427236a080d51453ac8b28ddcc1",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "dcbe820f910037e6b51eafbc5fcbaab78cb710fa9cd493e2517f13ed23e7a8d3": {
                "Name": "sandbox-ubuntu-0",
                "EndpointID": "56137551a2b84509c7c87716e393369cac045f25973aa7c913af43a9024c02a9",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

So how the /etc/resolv.conf is defined? Is it possible to make the content configurable through footloose YAML?

I'm on Mac, and my local /etc/resolv.conf is like this:

cat /etc/resolv.conf
# ...
nameserver 192.168.10.1

So I'm really trying to link up these dots to have a complete picture for DNS resolution.