-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get true net=host? #271
Comments
Another use case, I'd like to use binaries in docker images, e.g. cqlsh or sqlplus to access connect an ssh tunnel opened on my host to access distant machines right now this doesn't seem to work.
On linux it works. Just in case the ssh config is ok
|
I am consolidating the issue of make |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Hi, sorry if this isn't really a bug.
Expected behavior
I wanted to have the container use the same IP as the Mac host using the
--net=host
ornetwork_mode: host
options.Actual behavior
The HyperKit/xhyve/bhyve or something requires the container to take on a separate IP.
Information
Diagnostic ID: FF15D52E-9115-4F19-8A44-C88B257007C2
Docker for Mac: 1.12.0-a (Build 11213)
macOS: Version 10.11.6 (Build 15G31)
[OK] docker-cli
[OK] app
[OK] moby-syslog
[OK] disk
[OK] virtualization
[OK] system
[OK] menubar
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux
Steps to reproduce
ifconfig | grep inet #192.168.xxx.xxx
docker run --net=host --rm -i cyberkov/node-sonos-http-api /bin/sh
ifconfig | grep inet #192.168.yyy.yyy
The reason I want the container IP to match the host IP is because the container is trying to discover uPNP devices so the devices need to be able to reach back to the container directly.
Maybe there's some other Docker/networking/uPNP trick that I'm missing. But if there is, then please let me know.
I'm also not sure if the docs should make users aware that
--net=host
for Docker for Mac behaves slightly different. 20/20 hindsight says it should have occurred to me that there is another machine inside the host, but everything works so transparently with Docker for Mac, it just totally didn't occur to me until hours later.Thanks again for such an awesome product.
The text was updated successfully, but these errors were encountered: