Sign inSign up

theldus/dnsmasq

By theldus

•Updated over 1 year ago

A simple dnsmasq build for armv6 that also runs on armv7 and aarch64

Image
0

289

theldus/dnsmasq repository overview

This is my personal build of dnsmasq for my Mikrotik:

⁠Linux instructions

Build:

export CC="armv6-linux-musleabi-gcc"
export LDFLAGS="--static"
make -j4

Upload to Dockerhub:

$ docker buildx build --platform linux/arm/v6,linux/arm/v7,linux/arm64 . --tag theldus/dnsmasq:latest --push

Dockerfile:

FROM scratch
ADD dnsmasq /
EXPOSE 53/udp
CMD ["/dnsmasq","-k","--conf-dir=/conf","--pid-file=/dns.pid"]

My dnsmasq.conf:

no-resolv
no-poll
no-hosts
server=45.90.28.194
server=45.90.30.194
filter-AAAA
min-cache-ttl=3600
cache-size=1000
port=53
user=
group=

⁠Mikrotik instructions

Script to run on startup:

/system/script
add dont-require-permissions=no name=add_my_dnsmasq_container owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":delay 20s\r\
    \n/container remove [find tag~\"dnsmasq\"]\r\
    \n:delay 10s\r\
    \n/container\r\
    \nadd remote-image=theldus/dnsmasq:latest interface=veth3-docker mounts=flash root-dir=tmpfs/dnsmasq workdir=/\r\
    \n:delay 10s\r\
    \n/container start [find tag~\"dnsmasq\"]"

Scheduler:

/system scheduler
add name=start_my_dnsmasq_container on-event=add_my_dnsmasq_container policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup

You should also create the interface veth3-docker, apply your FW rules, point Mikrotik's own DNS to this one, and etc etc

Tag summary

Content type

Image

Digest

sha256:fad29fdfe…

Size

250.8 kB

Last updated

over 1 year ago

docker pull theldus/dnsmasq