Skip to content

Vadim-Zenin/dnsmasq-ubuntu-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dnsmasq_ubuntu_18.04

Lightweight and simple DNS, DHCP and TFTP server on official Ubuntu 18.04

dnsmasq version: 2.79

Docker image: Ubuntu 18.04 (Bionic Beaver)

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.

Build a docker image

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 .

Tag and Pull the image

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

Run the docker image

  • 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/

Run the docker image with ports for DNS and TFTPD in interactive

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

Run the docker image with ports for DNS and TFTPD in background

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.

Run the docker image without standard DNS ports. DNS would not work properly.

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

Source files location is GitHub

Continuous integration

TeamCity Kotlin script located in .teamcity/

Docker registry

Docker registry link

License

Licensed under the GNU GENERAL PUBLIC LICENSE Version 3 License. See the LICENSE file for details.

Author Information

Created by Vadim Zenin.

About

Lighweit DNS, DHCP and TFTP server on official Ubuntu 18.04

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published