Skip to content

Instantly share code, notes, and snippets.

@MarkGalloway
Created April 3, 2018 17:48
Show Gist options
  • Save MarkGalloway/21f577034ba0d8b1b47ccaa656da3ee2 to your computer and use it in GitHub Desktop.
Save MarkGalloway/21f577034ba0d8b1b47ccaa656da3ee2 to your computer and use it in GitHub Desktop.
How to prevent volume mount from copying specific paths
version: '2'
services:
api:
build: .
command: npm run watch
volumes:
- .:/code
- /code/node_modules # Protects this path on api from being mounted with node_modules from local machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment