Skip to content

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

Merged
merged 2 commits into from
Nov 15, 2016
Merged

Conversation

tpreusse
Copy link
Contributor

Without the .dockerignore file the npm modules installed inside the image possibly get overwritten by your local modules.

The overwriting happens here:

COPY . /usr/src/app

Given you have a node_modules folder locally.

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:
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.

@ryanmurakami
Copy link
Contributor

LGTM. Thanks for making that change!

@tpreusse
Copy link
Contributor Author

Thank you for reviewing.

@tpreusse
Copy link
Contributor Author

How do you handle the update of translations?
The Ukrainian version seems to be just English:
https://github.com/nodejs/nodejs.org/blob/master/locale/uk/docs/guides/nodejs-docker-webapp.md
Should I change it there too?

There is also a Korean version:
https://github.com/nodejs/nodejs.org/blob/master/locale/ko/docs/guides/nodejs-docker-webapp.md

@ryanmurakami
Copy link
Contributor

@tpreusse You can ping the projects here. Like this: @nodejs/nodejs-uk @nodejs/nodejs-ko

@outsideris
Copy link
Contributor

I'm from nodejs-ko. We will update the Korean document after this PR merged.

@ghaiklor
Copy link
Contributor

@denysdovhan @nodejs/nodejs-uk I think we need to update it after PR is merged as well.

@ryanmurakami ryanmurakami merged commit 264307d into nodejs:master Nov 15, 2016
@ryanmurakami
Copy link
Contributor

@tpreusse Thanks for the contribution!

@tpreusse tpreusse deleted the patch-1 branch November 15, 2016 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants