mirror of
https://github.com/mageddo/dns-proxy-server.git
synced 2026-04-25 09:25:56 +03:00
[GH-ISSUE #80] Compose not supported with latest docker #36
Labels
No labels
bug
confirmed
discussion
duplicate
enhancement
feature
feature-request
not-planned
pull-request
secondary-feature
stale
triage
waiting-feedback
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/dns-proxy-server-mageddo#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gliviu on GitHub (Jul 8, 2018).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/80
According to this answer and #70, DPS seem to have worked for containers started from docker compose.
Tried with docker version 18.03 and id din't work.
I used the compose file from SO answer.
Started DPS with
docker run --rm --hostname dns.mageddo --na....Then
Tried with
docker runinstead of compose and DPS correctly uses '172.17..' network.Specs:
inux liviu 4.13.0-45-generic #50~16.04.1-Ubuntu SMP18.03.1-ce, build 9ee9f402.5.4@mageddo commented on GitHub (Jul 8, 2018):
Thank you for your great question.
The main point here is that the containers (redis, elasticsearch) are running at different networks than dns-proxy-server so dns-proxy-server have not firewall permissions to talk with them, this is a docker premise
To make it work you'll have to put then on same network, as I see you are using
docker stack deploy, if you usedocker-compose upyou can put them on same network by addingnetwork_modeoptionTo make it work with
docker stack deployyou'll have to usenetworksoption (it works for docker-compose as well)Creating a common network
Running DPS at just created network
Then it should work, note that create a external network is necessary since all containers must ran at same network and DPS was started without docker stack deploy
If you don't want to manually create an external network then you will have to start DPS at the same stack file that way docker will create a network for that deploy and assign all those containers at same network
The drawback is that you will have to volume resolv.conf to have sure others containers will bind it correctly
Observation
Not related to your question but as you are using
docker stack deploythen you are usingdocker swarm, you must be awareDPSwill solve just containers started at the current machine, it will not solve containers from others cluster nodes.PS: I used alpine container because is more lite to pull and start.
UPDATE Must run DPS specifying network at example 2
@gliviu commented on GitHub (Jul 9, 2018):
Thanks for the quick answer. I'll check and get back with results.
@gliviu commented on GitHub (Jul 11, 2018):
Using
docker-composeworks as expected which should be enough for developer machines.Didn't manage to make it work using stack deploy.
My
docker network inspect github:And
/etc/resolv.confAnd I can't even ping 10.0.0.3 from my host machine.
However since
docker-composesolution works fine I suppose we can safely close this issue.@mageddo commented on GitHub (Jul 11, 2018):
Did you try all of the examples I've presented and none of them worked with docker stack?
@gliviu commented on GitHub (Jul 11, 2018):
Yes, I've tested both the above examples with docker stack. Although the first example uses
network_mode: bridgewhich is ignored for swarm deploys according to spec.@mageddo commented on GitHub (Jul 11, 2018):
All right, the first one is expected to not work with
docker stack, the others are. Thank you for your feedback. Then I'm closing this issue