Handling multiple projects/containers which expose same ports

Expected behavior

On Linux I can create separate bridge network (using docker-compose) for each project. For example:
Docker creates a separate interface for this network and binds all container ports to this address. This way I can have multiple projects which expose same ports on different networks.

I am facing the same issue with virtualbox and docker-machine. As a workaround I can create a separate VM for each project.

How to handle multiple projects/containers which expose same ports with Docker for Mac since I can’t use multiple networks?

Actual behavior

Currently only one interface is created (for xyve VM, e.g. Bridged networks defined in compose are created inside VM and are unreachable from host.


Interface (from ifconfig):

ether 82:e6:50:22:05:64
inet netmask 0xffffff00 broadcast
	id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
	maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
	root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
	ipfilter disabled flags 0x2
	member: en4 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 10 priority 0 path cost 0
	nd6 options=1<PERFORMNUD>
	media: autoselect
	status: active

This might actually be a duplicate of [Multiple VMs](Feature Request: Multiple VMs](Feature Request: Multiple VMs). I guess there is no way to access bridged networks inside VM?