linux/docker

Connect a container to a local physical interface

chozo99 2015. 5. 13. 15:32


https://github.com/jpetazzo/pipework/#connect-a-container-to-a-local-physical-interface


docker run --name chozo99 --rm -it ubuntu bash

sudo ./pipework eth0 chozo99 192.168.15.250/24@192.168.15.254



Virtualbox

If you use VirtualBox, you will have to update your VM network settings. Open the settings panel for the VM, go the the "Network" tab, pull down the "Advanced" settings. Here, the "Adapter Type" should be pcnet (the full name is something like "PCnet-FAST III"), instead of the default e1000 (Intel PRO/1000). Also, "Promiscuous Mode" should be set to "Allow All". If you don't do that, bridged containers won't work, because the virtual NIC will filter out all packets with a different MAC address.