Lightweight and simple DNS, DHCP and TFTP server on official Ubuntu 18.04
dnsmasq version: 2.79
The image is intended to provide DNS, DHCP and TFTP service in small, middle and Development environments.
Important Note:
Please use an attached volume. Example:
-v /opt/dnsmasq/etc:/etc/dnsmasq
The image will extract default configuration files if an attached volume either directory empty or dnsmasq.conf deleted/renamed. Please copy or backup your modified configuration files to different lo before you rename or delete dnsmasq.conf in the attached volume. If you do not use the attached volume all configuration will be reset to initial after docker restart.
This image is built automatically and can be obtained on Docker Hub.
Use the following instructions if you need to manually build the image:
- Install Docker.
- Clone this repo to local directory.
pushd
into directory.- Run
docker build --no-cache=true --build-arg BUILD_VERSION="0.9.1.$(date -u +'+%Y%m%d%H%M')" --compress -t dnsmasq_ubuntu_18.04 .
docker login mysite.mydomain.com:8888
docker tag dnsmasq_ubuntu_18.04:0.9.2.201809102309 mysite.mydomain.com:8888/dnsmasq_ubuntu_18.04:0.9.2.201809102309
docker pull mysite.mydomain.com:8888/dnsmasq_ubuntu_18.04:0.9.2.201809102309
- Please check if port 53 used by different application
netstat -lntp | grep 53
- Stop the application
systemctl status systemd-resolved
systemctl stop systemd-resolved
- Create required folders for dnsmasq configuration files
mkdir -p -m 775 /opt/dnsmasq/etc/
docker run -it --rm --name test -p 53:53/tcp -p 53:53/udp -p 69:69/udp -v /opt/dnsmasq/etc:/etc/dnsmasq vadimzenin/dnsmasq_ubuntu_18.04:latest
docker run -d --rm --name test -p 53:53/tcp -p 53:53/udp -p 69:69/udp -v /opt/dnsmasq/etc:/etc/dnsmasq vadimzenin/dnsmasq_ubuntu_18.04:latest
If port(s) are used system return message:
Error starting userland proxy: listen tcp 0.0.0.0:53: bind: address already in use.
mkdir -p -m 775 /opt/dnsmasq/etc/
docker run -it --rm --name test -p 2253:53/tcp -p 2253:53/udp -p 2269:69/udp -v /opt/dnsmasq/etc:/etc/dnsmasq vadimzenin/dnsmasq_ubuntu_18.04:latest
docker run -it --rm --name test -p 2253:53/tcp -p 2253:53/udp -p 2269:69/udp -v /opt/dnsmasq/etc:/etc/dnsmasq <imageId>
Source files location is GitHub
TeamCity Kotlin script located in .teamcity/
Docker registry link
Licensed under the GNU GENERAL PUBLIC LICENSE Version 3 License. See the LICENSE file for details.
Created by Vadim Zenin.