Thank you. In you local machine in app folder you don't have node modules, so when you use mount your folder will override everything in /usr/src/app. The line you mentioned, sort of preventing overriding of node modules installed during the image build process.
You can do the same by adding node_modules to a .dockerignore file. 👍
No. dockerignore works only for the process of copying file during the build of the image and has nothing to do with mount.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.