diff --git a/config/dnsmasq/.gitignore b/config/dnsmasq/.gitignore new file mode 100644 index 0000000..1bb9feb --- /dev/null +++ b/config/dnsmasq/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!.example \ No newline at end of file diff --git a/config/dnsmasq/dnsmasq.conf b/config/dnsmasq/dnsmasq.conf deleted file mode 100644 index ca1a735..0000000 --- a/config/dnsmasq/dnsmasq.conf +++ /dev/null @@ -1,9 +0,0 @@ -#log all dns queries -log-queries -#dont use hosts nameservers -no-resolv -#use google as default nameservers -server=8.8.4.4 -server=8.8.8.8 -#explicitly define host-ip mappings -address=/homerealestate.cz/144.76.56.24 \ No newline at end of file diff --git a/docker-compose.yml.example b/docker-compose.yml.example index df0cc7e..d932f3f 100755 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -59,6 +59,14 @@ services: extends: file: docker-compose.base.yml service: inbucket + dnsmasq: + restart: always + build: + context: ./dockerfiles/dnsmasq + volumes: + - ./config/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf + cap_add: + - NET_ADMIN # @see https://man7.org/linux/man-pages/man7/capabilities.7.html volumes: database: diff --git a/dockerfiles/dnsmasq/Dockerfile b/dockerfiles/dnsmasq/Dockerfile new file mode 100644 index 0000000..c0aa943 --- /dev/null +++ b/dockerfiles/dnsmasq/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest + +# @see https://github.com/mcmar/docker-dnsmasq + +RUN apk --no-cache add dnsmasq + +EXPOSE 53/tcp 53/udp 67/udp + +CMD ["dnsmasq", "-k"] \ No newline at end of file