-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Docker: Add .dockerignore file in guide #1022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Without it `COPY . /usr/src/app` will possibly overwrite node_modules inside the image
@@ -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: |
There was a problem hiding this comment.
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.
LGTM. Thanks for making that change! |
Thank you for reviewing. |
How do you handle the update of translations? There is also a Korean version: |
@tpreusse You can ping the projects here. Like this: @nodejs/nodejs-uk @nodejs/nodejs-ko |
I'm from nodejs-ko. We will update the Korean document after this PR merged. |
@denysdovhan @nodejs/nodejs-uk I think we need to update it after PR is merged as well. |
@tpreusse Thanks for the contribution! |
Without the
.dockerignore
file the npm modules installed inside the image possibly get overwritten by your local modules.The overwriting happens here:
Given you have a
node_modules
folder locally.