Bridge100 bridge unavailable on host

Expected behavior

There will be docker0 interface/bridge available with an IP address to which I can bind services running on the host. This address will not be accessible from outside my Mac.

Actual behavior

Starting with beta9, there is no such interface - to see host-based services from within a container, I need to bind them to host IPs associated to network interfaces on the host, which makes these services accessible from outside my computer.

Earlier on (beta8 and lower) there was a 192.168.64.1 IP address associated with bridge100 interface which fulfilled the conditions above.

1 Like

Actually, I’ve worked this around by duplicating an existing interface and manually assigning it an IP address of my choice.

1 Like

@mnowrot Can you provide some details on yow you worked around this? Lacking bridge100, I have to idea how to connect to a service running in the container, such as sshd on port 22.

@ctaggart starting with beta9, the sshd service running in a container should be available on localhost:22 on the host. You can connect to it as you would to any service running on localhost (assuming that this service has bound to proper interfaces inside the container, and that default configuration (you can view it under “pinata list”) is applied to your docker for mac (network=hostnet and native/port-forwarding=true).

The other way around is more tricky - fortunately a service running in a container sees all interfaces on the host except localhost - so you can bind your host-based service to any of the interfaces on the host and it should work.

I’ve worked around my problem by entering System Preferences -> Network. Then I’ve selected an interface to duplicate, clicked the cog wheel icon below and selected “Duplicate Service…”. After that I’ve manually assigned an IP address (192.168.64.1) and the network mask (255.255.255.0) to the duplicate.

1 Like

@mnowrot That explanation really helped! I now have it working.

There was a more elegant solution proposed: Access host (not vm) from inside container

1 Like

You can get bridge100 back.

$ pinata set network nat
$ ifconfig

You should see bridge100 as a network interface again.

1 Like