mirror of https://github.com/docker/docs.git
Prevent node_modules from override via mount (#16545)
In the section `Use Compose to develop locally`, a docker-compose file is shown which mounts the app directory into the `notes` container to be able to change the code without rebuilding the image. Unfortunately, the node_modules directory which was created during the build will be overridden as the whole working directory /app gets mounted. Therefore, this directory needs to be secured by adding it to the volumes.
This commit is contained in:
parent
520a0ff7a4
commit
67ff95b75a
|
@ -140,6 +140,7 @@ services:
|
|||
- CONNECTIONSTRING=mongodb://mongo:27017/notes
|
||||
volumes:
|
||||
- ./:/app
|
||||
- /app/node_modules
|
||||
command: npm run debug
|
||||
|
||||
mongo:
|
||||
|
|
Loading…
Reference in New Issue