Skip to content

Docker for Mac and docker network access from host #171

Closed
@stefanfoulis

Description

Expected behavior

I can access all containers by ip address from my OSX host directly.

Actual behavior

I can't access containers by network unless I map ports to 127.0.0.1.

Information

Diagnostic ID: 13B73004-5CA7-40F3-B597-AA61D1FC6C37
Docker for Mac: 1.12.0 (Build 10871)
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 the behavior

  1. docker run --name=httpd -d httpd
  2. docker inspect httpd extract IPAddress from the output (e.g 172.17.0.2)
  3. curl http://172.17.0.2/ - expected to get the apache page, but get a timeout

Notes

I understand that the reason for this not working, is that this is due to the documented fact that there is no docker0 interface available on osx (https://docs.docker.com/docker-for-mac/networking/#/there-is-no-docker0-bridge-on-osx).
For our workflow (allowing the host to access containers directly from the host, without port mapping) it is pretty crucial. So my main question is, if there are plans to support this or if it is an impossible to overcome technical hurdle.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions