★ wanayoo — archive 1999 https://github.com/nodejs/docker-node/issues/150Nouvelle recherche | Portail wanayoo
Skip to content
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

Feature request for private modules #150

Closed
EloB opened this issue Apr 14, 2016 · 6 comments
Closed

Feature request for private modules #150

EloB opened this issue Apr 14, 2016 · 6 comments
Labels

Comments

@EloB
Copy link

@EloB EloB commented Apr 14, 2016

Right now the official miss out a important piece and that is private modules. I think a lot of companies and including my own private projects needs this feature. Also some documentation how to use it would be awesome as well :)

Here are some more information
http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules
https://blog.risingstack.com/private-npm-with-docker/

I like this approach.
docker build --build-arg NPM_TOKEN=${NPM_TOKEN} .

@Starefossen
Copy link
Member

@Starefossen Starefossen commented Apr 25, 2016

This comment from npm/npm#8356 might be applicable for this discussion:

npm supports using more than one registry at a time. Because of this, supporting a single NPM_TOKEN environment variable is untenable. We might be interested in a more general solution in the future, but the cli team doesn’t have this scheduled for the coming year.

@Starefossen
Copy link
Member

@Starefossen Starefossen commented Apr 25, 2016

My personal opinion is, yes, it would be nice to support the NPM_TOKEN out of the box but it would require an entrypoint.sh approach (I think).

@LongLiveCHIEF
Copy link

@LongLiveCHIEF LongLiveCHIEF commented Aug 1, 2016

Why not just support an env_file, so users can docker run --env-file ./.npmrc? The local .npmrc would contain the token, and it would also allow special registries to be used, in addition to the default registry.npmjs.org?

@LaurentGoderre
Copy link
Contributor

@LaurentGoderre LaurentGoderre commented Nov 21, 2016

I would also prefer the mounting of a local .npmrc into the image, but if we choose this approach, it should be in the docs

@joeskeen
Copy link

@joeskeen joeskeen commented Dec 23, 2016

I also like being able to mount a local .npmrc file because there are other settings that could be included, such as registry=http://my-custom-registry. Also, it would be great to include the custom .npmrc file in the onbuild image, something like ONBUILD COPY .npmrc /usr/src/app/.

@LaurentGoderre
Copy link
Contributor

@LaurentGoderre LaurentGoderre commented Dec 3, 2018

I believe there are several ways to address this from setting the env var at run time to mounting a npm config file. Feel fee to re-open if this doesn't meet your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.