Coder Social home page Coder Social logo

docker-compose does not work about docker-dnsmasq HOT 1 CLOSED

4km3 avatar 4km3 commented on July 18, 2024
docker-compose does not work

from docker-dnsmasq.

Comments (1)

rodrigofuente avatar rodrigofuente commented on July 18, 2024

Hello yelijun,

First of all, the image used in your docker-compose is not the one provided in our project.

With our image in place, and the correct capabilities, everything works as expected.

Let me detail the testing scenario:

docker-compose.yaml:

version: '3.7'

services:
 dnsmasq:
  image: 4km3/dnsmasq:2.85-r2
  container_name: dnsmasq
  ports:
  - '9053:53/udp'
  - '9053:53/tcp'
  cap_add: ['NET_ADMIN']

Here I am mapping the service to listen on 9053 only for testing purposes, in order to avoid possible conflicts with other resolvers that may already be running on your system.

With that compose up, you can check it works correctly by using any domain query tools, for example dig:

$ dig @127.0.0.1 -p 9053 google.com

; <<>> DiG 9.16.1-Ubuntu <<>> @127.0.0.1 -p 9053 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5740
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.   IN A

;; ANSWER SECTION:
google.com.  177 IN A 172.217.168.238

;; Query time: 0 msec
;; SERVER: 127.0.0.1#9053(127.0.0.1)
;; WHEN: Sat Jun 19 12:03:31 UTC 2021
;; MSG SIZE  rcvd: 55

from docker-dnsmasq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.