Hi, I’m using Docker 1.13.1 on my Centos 7.3 virtual machine and run a container based on Centos 6 on it.
My problem is that I want to acccess my container from outside of the virtual machine but without port mapping!
Is there a way to access my container via IP or hostname?
Maybe I could give my container a IP from my DHCP like my virtual machine (10.10…) gets one?
At the moment my container is using the default docker bridge (docker0) where he gets a IP like 172.17.0.*
Yes I think so since this driver allows you to expose the internal IP to the vlan.
I’ve never tried it myself but that’s what I understand from the docs.
I will try it again with macvlan and give you some feedback if i could solve my problem.
But the problem is that i have tried so many things but nothing worked like i want it to work.
With port mapping it worked very nice but in this case i can just access my container from outside with like: host-ip:port
With pipework (https://github.com/jpetazzo/pipework) i was able to get a IP from my DHCP Server. Pinging from docker host to container and back worked well but from outside i had no chance.
Did you ever get this working with MACvLAN? I’m finding I’m unable to have host <-> container communication, or continer <->host<->host<->container communication either.
I can get containers on the same MACvLAN to ping, and also DNS, but that’s about it. I need my continers to be about to talk to the outside world. Also, mapping ports in the run command doesn’t seem to help.