When using DockerMachine, solving this was considerably easier.
All you needed to do was add a host-only or bridged adapter (depending on whether you wanted the container to see your whole network or just your machine) in VirtualBox. Then the host could communicate with a container running with the --net=host argument via that adapter, and the container was also able to talk to anything on the docker0 network.
Judging by the number of threads that have been popping up with similar questions to this one, this seems like a fairly common use case for a variety of purposes.
Can’t something similar be done with this new VM? Is creating host-only or bridged adapters not possible with xhyve?
I’m hoping a similarly simple solution will be found (or provided by the docker team if it’s just not possible right now).
There should be a straightforward way to connect to a container running --net=host.