-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
npm install
uses wrong package
#17
Comments
Interesting -- this is actually the very reason why the ruby image changes
the default location for ".bundle" to not be in the application directory (
https://github.com/docker-library/ruby/blob/de0bb696964c7ab9b947b1f46993dab484eca259/2.2/Dockerfile#L28-L33).
I wonder if NPM has a similar option? Otherwise, your best bet is going to
be adding "node_modules" to ".dockerignore" in your application directory
next to your "Dockerfile".
|
building with |
Yeah, that's untrue, unless you explicitly symlink ".dockerignore" to your
".gitignore".
|
thanks for the clarification, I might have been confused by something else, maybe by how |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the following weird combination that leads to unexpected results.
I am running docker on Windows, and in my
package.json
there is a dependency tophantomjs
which install a different executable depending on the environment is in: if it's on windows it downloads a windows executable, if it's on linux it downloads a linux executable. Apparently, thenpm install
command is run in my windows environment, or it caches the windows packages, Since if I enter the docker image bash and Ils
into thenode_modules
phantomjs folder, I see the windows executable. If I doinside the docker container bash it installs the correct phantomjs executable. Is it true that the
npm install
run duringdocker build
depends on the host environment and not the container environment? This could explain why, otherwise could be a caching problem... Can someone shed some light?The text was updated successfully, but these errors were encountered: