I try to create a local development enviornment using docker-compose. I was planning to allow a docker service to expose a port to host machine and therefore the machine can access the service. Unfortunately, it seems to me that it doesn't work on windows and mac os.

reference:
https://stackoverflow.com/questions/48915458/windows-run-docker-with-network-host-and-access-with-127-0-0-1