Connect directly to container

Is it possible to connect directly to container?
In native docker environment there is possibility to connect with container via its IP address. E.g. nginx container is running. IP can be obtained using “docker inspect”. Navigating to http:// works as expected.
On OSX we’ve got xhyve in the middle so only using port mapping it is possible to access container. Is there possibility to create network bridge so it would be possible to connect in the same manner as in docker running natively? There are some cases where local service is running on given port and mapping is not possible/desired. For example 4 nginx servers running on 80 + dnsmasq service that would redirect to specific nginx container based on host.

Thanks in advance.

1 Like

I came here looking for this as well. Even if it’s just a matter of routing the entire contained subnet through xhyve, this would be very useful.

I’ve been able to connect to xhyve machine using screen:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
login is root. no password
Inside i can see docker0 bridge and gate to outside via eth0 with IP and gateway on However Im not able to trace how it translates to OSX routing aaaand my network-fu skill is wayyyy too low to grasp such knowledge :slight_smile: Maybe someone could shed some more light and/or try to propose some kind of solution :confused:

For anyone interested here’s topic relevant to this problem:

This is related to the following topic: