uxbh / ztdns

DNS server for a ZeroTier virtual network
MIT License
245 stars 50 forks source link

Docker-Compose - Can't find interfaces #16

Open hellor00t opened 5 years ago

hellor00t commented 5 years ago

Error: fatal msg="Could not get interface: route ip+net: no such network interface\n" interface = "zt7nnjn3xu" list in .ztdns.toml in the root directory of the git repo

I can start the service using the pre-compiled executable with the same config file and have no problems.

Running this on CentOS 7 as root.

step21 commented 5 years ago

Same thing here...

Kznzl commented 5 years ago

It seems that the error is raised because by default the containerized daemon doesn't have access to any of the zerotier interfaces of the host machine.

It's possible to solve the issue by commenting out the interface section in zerotier config, so the daemon is bound to all interfaces inside the container, and configure some port forwarding in compose file instead:

version: '3'
services:
  ztdns:
    build: .
    ports:
     - "192.168.191.218:5356:53/udp"
    volumes:
     - .ztdns.toml:/app/.ztdns.toml
wei commented 4 years ago

Changing the interface from zt0 to eth0 worked for me. eth0 is the default interface name in alpine.