shuveb / containers-the-hard-way

Learning about containers and how they work by creating them the hard way

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gocker containers aren't talking to each other

kspviswa opened this issue · comments

commented

Hello,

Thanks for making this project opensource. I'm trying to play with it. I created 2 containers running alpine image and /bin/sh shell each.

Container A got ip 172.29.15.82 and Container B got ip 172.29.174.195. As you can see, gocker0 bridge in host was setup with 172.29.0.0/16 range.

Bridge control shows gocker0 was setup as expected

sudo brctl show gocker0
bridge name	bridge id		STP enabled	interfaces
gocker0		8000.2a5377828fc2	no		veth0_7de037
							                        veth0_def9e1

However, if I ping one another, there is no talking

/ # ping 172.29.174.195
PING 172.29.174.195 (172.29.174.195): 56 data bytes
^C
--- 172.29.174.195 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
/ #

What am I missing ?

commented

Update:

After I run enable_internet.sh script, containers started seeing each other. Looks like there has to be a forwarding rule configuration to enable routing even within the ns. I hoped gocker to take care of that internally. Nevertheless, please consider this issue resolved.