Skip to content

Commit b4a4cca

Browse files
committed
docker: Add dnsmasq and avahi-daemon
dnsmasq and avahi-daemon are needed to test DNS and mDNS. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 41132e9 commit b4a4cca

File tree

5 files changed

+77
-3
lines changed

5 files changed

+77
-3
lines changed

docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ RUN apt update && apt install -y \
88
dante-server \
99
curl \
1010
netcat \
11-
tcpdump
11+
tcpdump \
12+
dnsmasq \
13+
avahi-daemon
1214

1315
# We need the net-tools project as it contains helper apps needed
1416
# in testing.
@@ -62,11 +64,11 @@ COPY mosquitto.conf mosquitto-tls.conf /usr/local/etc/mosquitto/
6264
# network sample.
6365
# The syslog-receiver.py will test syslog-net sample
6466
COPY http-server.py https-server.py http-get-file-test.sh \
65-
syslog-receiver.py /usr/local/bin/
67+
syslog-receiver.py dnsmasq.sh avahi-daemon.sh /usr/local/bin/
6668
COPY http-get-file-test.sh /usr/local/bin/https-get-file-test.sh
6769

6870
# Dante is SOCKS proxy. The gptp.conf is conf file for linuxptp.
69-
COPY danted.conf gptp.cfg /etc/
71+
COPY danted.conf gptp.cfg dnsmasq.conf avahi-daemon.conf /etc/
7072

7173
WORKDIR /net-tools
7274

docker/avahi-daemon.conf

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# See avahi-daemon.conf(5) for more information on this configuration
2+
# file!
3+
# This is specifically tailored for testing mDNS in Zephyr OS.
4+
5+
[server]
6+
host-name=zephyr
7+
domain-name=local
8+
use-ipv4=yes
9+
use-ipv6=yes
10+
allow-interfaces=eth0
11+
enable-dbus=no
12+
#browse-domains=0pointer.de, zeroconf.org
13+
#disallow-other-stacks=no
14+
#allow-point-to-point=no
15+
#cache-entries-max=4096
16+
#clients-max=4096
17+
#objects-per-client-max=1024
18+
#entries-per-entry-group-max=32
19+
ratelimit-interval-usec=1000000
20+
ratelimit-burst=1000
21+
22+
[wide-area]
23+
enable-wide-area=no
24+
25+
[publish]
26+
#disable-publishing=yes
27+
#disable-user-service-publishing=no
28+
#add-service-cookie=no
29+
#publish-addresses=yes
30+
publish-hinfo=no
31+
publish-workstation=no
32+
#publish-domain=yes
33+
#publish-dns-servers=192.168.50.1, 192.168.50.2
34+
#publish-resolv-conf-dns-servers=yes
35+
#publish-aaaa-on-ipv4=yes
36+
#publish-a-on-ipv6=no
37+
38+
[reflector]
39+
#enable-reflector=no
40+
#reflect-ipv=no
41+
42+
[rlimits]
43+
#rlimit-as=
44+
rlimit-core=0
45+
rlimit-data=4194304
46+
rlimit-fsize=0
47+
rlimit-nofile=768
48+
rlimit-stack=4194304
49+
rlimit-nproc=3

docker/avahi-daemon.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
ip link set eth0 multicast on
4+
5+
avahi-daemon -f /etc/avahi-daemon.conf

docker/dnsmasq.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Sample dnsmasq for testing DNS and DHCPv4
2+
3+
interface=eth0
4+
port=5353
5+
bind-interfaces
6+
no-resolv
7+
8+
address=/www.zephyrproject.org/192.0.2.2
9+
address=/www.zephyrproject.org/2001:db8::2
10+
11+
domain=zephyr.test
12+
dhcp-range=192.0.2.16,192.0.2.32,1h
13+
log-dhcp
14+
15+
user=root

docker/dnsmasq.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
dnsmasq -C /etc/dnsmasq.conf

0 commit comments

Comments
 (0)