This guide uses Docker to run dnsmasq.
For Docker installation, see Docker.
Create a directory to store your configuration and compose files.
mkdir -p /opt/dnsmasq
cd /opt/dnsmasq
Define a container for dnsmasq.
services:
dnsmasq:
image: dnsmasq:latest
ports:
- "53:53/udp"
- "53:53/tcp"
volumes:
- ./config:/etc/dnsmasq
Start the container in the background.
docker compose up -d
Running dnsmasq in containers for production? We help with:
Need help? office@linux-server-admin.com or Contact Us