I’m using Docker for Windows with a Linux container.
Is it possible to configure the container to act as if it was a computer on the host’s network? That is, no port forwarding from host to container, no separate subnet etc.
So far, I tried to go far a macvlan network driver, but eventually the host could not ping the container and the container could not ping the host.
The restriction that macvlan interfaces can not directly communicate with their parent interface - this a security feature of your hosts kernel and NOT a restriction introduced by docker.
I did run very complex orchestarted container setups in my job and NEVER needed macvlan once in 6 years. Usualy people trying to enforce old habits from the vm world to the container world are the only ones convinced that macvlan is the right and only solution
Well what you WANT can done with MACVLAN (there is even a workaround for the limitation) or IPVLAN though it doesn’t necessarily mean that it is what you NEED or what a experienced docker user would use.
Feel free to use whatever works. I am quite sure MACVLAN was discussed in this forum plenty of times and the forum’s search function will bring up some valuable details. Good luck!
Earlier version of the macvlan documentation actualy had all the relevant information and even covered the required workaround to bypass the kernel limitation. The current docs are a slimed down version that only shows the commands to create a docker network with the macvlan driver. Its a shame.