Docker Community Forums

My goal is to make my Linux container live on the same lan as host and other devices.
Because I need to use nmap frequently to scan the devices mac address on the lan. Unfortunately, the nmap scanning is only working when these machines all live on the same subnet.

I’ve tried several ways to make it happen, but all failed.
Although there are lots of instructions about how to do this, seem like they are all for Docker for Linux.

For example, a very detailed instructions from stackoverflow is also not working for me:stackoverflow.com

Macvlan:

it seems like Docker for Windows 10 doesn’t support macvlan due to I have no way to make Windows network adapter as parent…

Pipework:

which is only working on Linux system but I am using Windows 10…

Modify bip from daemon.json:

I tried, which will set docker0 to static IP then container is still not able to ping devices on the LAN. I guess it’s because the container is placed at NAT and change docker0 bridge ip won’t be able to achieve my goal.

It’s able to ping everything on my subnet, but the IP is still not from my subnet but 192.168.65.3.

Then I was trying to change the eth0 ip to static IP by editing /etc/network/interface.d/eth0, after restart networking service, the eth0 ip is changed to static ip from my subnet, but the network is not working anymore.

PLEASE, if anyone here knows how to place Windows 10’s Linux Container on the LAN as same as host’s.

@feeney I am sorry that image cannot be pulled. I didn’t release any image on the repo, the repo is just for explaining how to do it, it’s just a page that can help ppl to understand the way to assign Docker for Windows’ container to the LAN as host’s.

And actually… even if there’s an image exists, pulling my image cannot achieve the goal as well. You will need to setup vSwitch and modify the source code in Docker/resource/MobyLinux.ps1 so you can place your container in the LAN.