Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add simple .dockerignore file for node
Without it `COPY . /usr/src/app` will possibly overwrite node_modules inside the image
  • Loading branch information
tpreusse authored Nov 12, 2016
commit eb33109494d56c2a0ed92a94d187aaafe8dea576
9 changes: 9 additions & 0 deletions locale/en/docs/guides/nodejs-docker-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ EXPOSE 8080
CMD [ "npm", "start" ]
```

## .dockerignore file

Prevent your local modules and debug log from being copied into your Docker image:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just make this statement a little clearer, something like:
To prevent your local modules and debug logs from being copied onto your Docker image, create a .dockerignore file with the below contents:

Also, you should mention where this file will go.


```
node_modules
npm-debug.log
```

## Building your image

Go to the directory that has your `Dockerfile` and run the following command to
Expand Down