Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set IP address using docker labels #106

Open
wazzaguy opened this issue Aug 30, 2019 · 4 comments
Open

Unable to set IP address using docker labels #106

wazzaguy opened this issue Aug 30, 2019 · 4 comments

Comments

@wazzaguy
Copy link

wazzaguy commented Aug 30, 2019

I can't seem to set custom ip addresses using labels and through curl -X PATCH

Has dnsdock been abondond ? and if so is there an alternative?

@aacebedo
Copy link
Owner

Hi.

I'll try to look to your issues dns others asap.
I also want to update all dependencies of dnsdock and try to keep it up to date more than the last months.
Can you give me a use case a little more detailed so I'll be able to reproduce the issue.
Regards.

@wazzaguy
Copy link
Author

I created the dockdns as such:
docker run -d --name dockdns -v /var/run/docker.sock:/var/run/docker.sock -p 192.168.2.60:53:53/udp -p 50080:80 tonistiigi/dnsdock:latest --verbose

I have a test container called: 'wazztest'

I set a label on the container and looked at the output of dnsdock it showed the following:
Added service: a3ad061840ac80f68bcb7f24b01b88df515236cef56c1c59c065e270b8d718a2 {wazztest wjg-alpine 172.17.0.2 -1 []}

docker inspect showed the label was there:
"Config": {
"Labels": {
"com.dnsdock.ip_addr": "192.168.2.60"
}
},

I tried to PATCH directly using curl:
curl http://192.168.2.60:50080/services/abe6b44181aa13b364f4d22743eb00c0d9f94f8be31fe3ba961b92397760a6b5 -X PATCH --data-ascii '{"ip": "192.168.2.60","ttl": 0}'

and I checked if it changed but it hadn't:
curl http://192.168.2.60:50080/services/abe6b44181aa13b364f4d22743eb00c0d9f94f8be31fe3ba961b92397760a6b5

response:
{"Name":"wazztest","Image":"wjg-alpine","Ip":"172.17.0.2","Ttl":0,"Aliases":[]}

I can however change the TTL using curl but I can't using the com.docker.ttl label.

@wazzaguy
Copy link
Author

My use case is to supliment my internal dns router which has A records pointing mainly to a reverse proxy with the exception of a couple of docker containers within a swarm.

Everytime I create a new website within the reverse proxy I then have to define an A record on my router to point it to my reverse proxies internal IP.

I'd like to instead define a preferred DNS to DNSDOCK's ip address and have it return the A record host ip I define within a label.

@psyciknz
Copy link

My use case is to supliment my internal dns router which has A records pointing mainly to a reverse proxy with the exception of a couple of docker containers within a swarm.

Everytime I create a new website within the reverse proxy I then have to define an A record on my router to point it to my reverse proxies internal IP.

I'd like to instead define a preferred DNS to DNSDOCK's ip address and have it return the A record host ip I define within a label.

Long time ago, i know, but did you ever get this working? I’m facing exactly the same thing. I want to specify a container and the location of a reverse proxy sever via labels so that I don’t have to manually update my routers dns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants