Docker container is unable to communicate over the VPN

I have a simple container created by:

docker run -it --rm -d -p 8080:80 --name web nginx

This is on my laptop at home. I am connected to our corporate VPN.
The resource I need my container to access is over the VPN.
My initial thought was that this shouldn’t be an issue. When the traffic leaves my container it will just use my laptops routing and figure out where to go–that seems to not be the case.
I am running wsl2 containers, I add traceroute to my container and when I to a traceroute I see:

# traceroute -I cypdelk01.ayz.network
traceroute to cypdelk01.ayz.network (10.1.35.160), 30 hops max, 60 byte packets
 1  172.17.0.1 (172.17.0.1)  0.249 ms  0.202 ms  0.192 ms
 2  10.1.0.1 (10.1.0.1)  3152.748 ms !H  3152.713 ms !H  3152.707 ms !H

The traffic never seems to leave the container. Is this a fixable problem?
Am I running into some limitation with Docker desktop on windows?
I have tried this from more than one computer the result is exactly the same.
The container has no problem communicating with the internet but can’t seem to reach anything on the vpn.

My google searches have not turned up anything helpful.

Anyone know if this can be fixed?

–Eric

So it turns out not to be a some mysterious network issue, just a simple IP conflict. Docker desktop’s implementation of kubernetes uses 10.1.0.0/16 as it’s default IP range. This can be changed by altering the file:

%APPDATA%\Docker\Roaming\cni\10-default.conflist.

The same file exists for the mac and linux but with a different path. The downside is that you may have to alter this file again after upgrading docker desktop which happens fairly often.

2 Likes

Hi, I maybe having a similar issue.

Can you elaborate on where this file is located that needs to be altered? I have Docker for windows installed but i cannot find any file on my windows system called 10-default.conflist.

Many thanks

Simon

Try: `%APPDATA%\Docker\cni\10-default.conflist

What value should I provide in the file?