I have a part of a docker-compose file like that:
volumes:
- ../services/myApp:/code/services/myApp
- /code/services/myApp/target
When I create the container, it creates the target folder on my host anyway.
The idea is that target folder would be excluded in the virtual mount. But it excludes all the files and folders inside of the target folder, but not the target folder itself. So when I create the container, the docker creates the empty target folder on my host. Which is not that bad, but it does create it with different permissions to what I have on my host for the myApp, which slightly inconvenient. Is there a way to make sure that target folder itself won't be created on my host when I do run the container ?