Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dockerfile copy ignore node_modules

Create file .dockerignore in your docker build context directory (so in this case, most likely a directory that is a parent to node_modules) with one line in it:

**/node_modules
although you probably just want:

node_modules
Info about dockerignore: https://docs.docker.com/engine/reference/builder/#dockerignore-file
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dockerfile #copy #ignore
ADD COMMENT
Topic
Name
5+3 =