Comments (5)
Can you show the output of ip addr ls
on the VM? And in the d-in-d container?
Can you try to resolve using Google's public DNS resolvers? e.g. host www.google.com 8.8.8.8
?
If it works, you could start the d-in-d container with -dns 8.8.8.8
.
Alternatively, I hope that I'll be able to understand what's happening from the output of ip addr
:-)
from dind.
From VM
ip addr ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:88:0c:a6 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
inet6 fe80::a00:27ff:fe88:ca6/64 scope link
valid_lft forever preferred_lft forever
3: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 46:85:5a:b4:93:2a brd ff:ff:ff:ff:ff:ff
inet 10.0.3.1/24 brd 10.0.3.255 scope global lxcbr0
inet6 fe80::4485:5aff:feb4:932a/64 scope link
valid_lft forever preferred_lft forever
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether e2:7c:b6:29:a4:d9 brd ff:ff:ff:ff:ff:ff
inet 172.17.42.1/16 scope global docker0
inet6 fe80::d4e0:9dff:fe50:d9a1/64 scope link
valid_lft forever preferred_lft forever
8: vethh1NQ9j: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master docker0 state UP qlen 1000
link/ether e2:7c:b6:29:a4:d9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::e07c:b6ff:fe29:a4d9/64 scope link
valid_lft forever preferred_lft forever
From dind
ip addr ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 5a:0f:7f:32:62:52 brd ff:ff:ff:ff:ff:ff
inet 10.0.42.1/16 scope global docker0
inet6 fe80::580f:7fff:fe32:6252/64 scope link
valid_lft forever preferred_lft forever
77: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 62:19:49:e7:b3:95 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.39/16 brd 172.17.255.255 scope global eth0
inet6 fe80::6019:49ff:fee7:b395/64 scope link
valid_lft forever preferred_lft forever
Using Google’s public DNS fixes dns lookup, but looks like my VM’s port forwarding doesn’t work.
I’m going to trying VM bridge network to see if it makes a difference.
On Oct 19, 2013, at 3:14 PM, Jérôme Petazzoni [email protected] wrote:
Can you show the output of ip addr ls on the VM? And in the d-in-d container?
Can you try to resolve using Google's public DNS resolvers? e.g. host www.google.com 8.8.8.8 ?
If it works, you could start the d-in-d container with -dns 8.8.8.8.
Alternatively, I hope that I'll be able to understand what's happening from the output of ip addr :-)—
Reply to this email directly or view it on GitHub.
from dind.
OK, I see the problem: in the VM, you have lxcbr0
on 10.0.3.1/24
, which overlaps with docker0
in DinD, which is 10.0.42.1/16
.
Solution 1: tear down lxcbr0
in the VM (and make sure that there is not iptables
rule doing fancy things with 10.0.3.0/24
).
Solution 2: setup Docker (in DinD) to use a different address for docker0
. (Shameless self-promotion: this blog post might help!)
from dind.
Jérôme
It works!
Thanks for your help.
Just one more question. I have this in /etc/network/interfaces
auto lo
iface lo inet loopback
auto docker0
iface docker0 inet static
address 10.1.1.1
netmask 255.255.255.0
bridge_ports eth0
bridge_stp off
bridge_fd 0
However, docker0 is not up when I start a Docker container. I have to manually do a ifup -a.
Is there a way to the interface file to be loaded when a container starts up?
Thanks
—ming
On Oct 23, 2013, at 12:38 PM, Jérôme Petazzoni [email protected] wrote:
OK, I see the problem: in the VM, you have lxcbr0 on 10.0.3.1/24, which overlaps with docker0 in DinD, which is 10.0.42.1/16.
Solution 1: tear down lxcbr0 in the VM (and make sure that there is not iptables rule doing fancy things with 10.0.3.0/24).
Solution 2: setup Docker (in DinD) to use a different address for docker0. (Shameless self-promotion: this blog post might help!)
—
Reply to this email directly or view it on GitHub.
from dind.
Ah, unfortunately, ifup -a
is (more or less indirectly) triggered by upstart
(or the plain old init, on Debian)...
The easiest solution might be to use ifup -a
(or to configure the interface manually in a custom script).
I should update my blog post to explain that!
from dind.
Related Issues (20)
- Support Docker v1.13 HOT 1
- ran into some issues running the docker run command HOT 1
- Cannot restart docker service inside the container HOT 1
- dind, swarm cluster, and container communication HOT 1
- Docker in Docker inside play-with-docker: "Permission denied" HOT 1
- Connecting another running container to Docker in Docker socket HOT 1
- Support: How to install apt-get inside Dockerfile HOT 1
- Error: Timed out trying to connect to internal docker host.
- Could base image be upgraded from Ubuntu 14.04 to 16.04? E.g. to allow Java installation in derived images HOT 1
- Fedora image not working HOT 1
- docker: Error response from daemon HOT 1
- hold on port number listen, but not interactive-able HOT 2
- Run Docker-in-Docker and expose the inside Docker to the outside world, but how to inside dind expose this already taken port number again? HOT 1
- Getting error with centos
- Docker in Docker: Not in privileged mode. HOT 8
- Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? HOT 5
- DinD DNS resolution
- Error creating default "bridge" network: Failed to Setup IP tables
- wrapdocker is missing in docker:dind HOT 1
- docker-compose in DinD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dind.