With some configuration you can map folders into drives on Docker. You can just build on MacOS and restart the app server in the container. I was using NodeJS though, so I'm not dealing with libc and syscall incompatibilities and such.
docker om MacOs is a second class citizen, because it runs in a VM. The networking is much more complicated because of this, which causes endless amounts of hard-to-debug problems and performance is terrible.