I want to create docker containers for my microservices. I'm doing this mostly as a learning exercise and as a requirement for my workspace. I'm developing and iterating on my microservices and tracking dependencies on my host will be a nightmare.
So, I have a git repository for every microservice. Originally, I was mounting local directories of these repositories onto each container. I was using my text editor on my local machine and then watching the file changes through docker. While this worked, it was way too slow for the file watcher (you can see many people have this problem especially with Docker for Mac).
I decided to take what I thought was the 'better practice' route. I cloned the individual repositories in my docker build. So far, my pages are being loaded much quicker :)
Now I have the dilemma of deciding how to best work on these files in my containers. If I use any sort of mounting, I can see my local files on my container, but not vice versa. Obviously, this is not good because I can't edit them using my fancy VSCode on my local machine.
If not through git, mounting, etc. what is the best way to work on my microservice files so that they're quick to load?
Edit: The only solution seems to be docker-sync. But considering the overhead and the lack of official support, I probably won't be pursuing it. Hope it does help someone though