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

Docker container domain name not accessible from application code #92

Open
samaddico opened this issue Jul 7, 2015 · 0 comments
Open

Comments

@samaddico
Copy link

So following setup documentation on
https://github.com/crosbymichael/skydock, i got this running and working fine

docker run -d -p 172.17.42.1:53:53/udp --name skydns crosbymichael/skydns -nameserver 8.8.8.8:53 -domain docker

I created 2 containers
mongo container

docker run --name mongo1 -h mongo1.mongo.dev.docker -p 27017:27017 -d mongo

Spring boot app container

docker run --name templatengine -h templatengine.template.dev.docker  -d template

Now, the spring app uses a mongo db.so i set host in code to mongo1.mongo.dev.docker,but it keeps timing out, without connecting.

Running dig @172.17.42.1 +short mongo1.mongo.dev.docker returns the appropriate IP.

I also tried linking the containers,but to no avail.

docker run --name templatengine -h templatengine.template.dev.docker --link mongo1:mongo1 -d templat

Any help is much appreciated.

@samaddico samaddico changed the title Docker domain name not accessible from application code Docker container domain name not accessible from application code Jul 8, 2015
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

1 participant