Hello,
When using a routed mode networking connection for a container, how can we take advantage of the avahi daemon for resolving local network hosts?
I usually install libnss-mdns on the container, and that works, however in the routed more, it can resolve host from container, container from host, but not other ips in the local network, but outside host.
In docker, there is a trick to do it with:
-v /var/run/dbus:/var/run/dbus -v /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket
so the docker container will use avahi-daemon of the host. Is there any way we can do similar in LXD?
Here is the profile I am using:
config:
raw.idmap: “both 1000 1000”
user.user-data: |
#cloud-config
package_update: yes
package_upgrade: yes
packages:
- libnss-mdns
user.network-config: |
version: 2
ethernets:
eth0:
addresses:
- 10.10.10.200/32
nameservers:
addresses:
- 8.8.8.8
search: []
routes:
- to: 0.0.0.0/0
via: 169.254.0.1
on-link: true
description: routed
devices:
eth0:
ipv4.address: 10.10.10.200
name: eth0
nictype: routed
parent: wlx74da38dc6b89
type: nic
root:
path: /
pool: default
type: disk
name: routed
Best Regards,
C.