How can I set up DNS to support subdomains?

I’d like to migrate my team from our previous Docker Toolbox + VMware Fusion setup to Docker for Mac. But our app relies on the ability to resolve subdomains for multi-tenancy, and I can’t figure out how this can be achieved with Docker for Mac…

Currently we set up OSX to route .dev TLD requests to the Docker network subnet, where a dns-gen container takes over DNS duties.

Does anybody know of a way to achieve a similar setup with Docker for Mac?


In development for multitenant app I use points to localhost, it’s just amazing!

I don’t know if it can solve your problem but you can test locally your multitenant app with this domain.

I found this tip on Stackoverflow.