-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix dockerfile -> Adding manually missing Python dependency prior to npm install and npmrc #6
Fix dockerfile -> Adding manually missing Python dependency prior to npm install and npmrc #6
Conversation
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.
The .npmrc
file looks good to me!!
@w3dani please have a look at it, I'm not sure if there is another way of doing it. |
I don't think this has bad implications, but I'm interested to know about the root cause for this error, I'd be surprised if the node alpine image wasn't prepared to build because of a missing dep? @w3dani thoughts? |
@feliun The reason for the error seems to be simple, node-alpine versions do not have Python installed, so when building the image, npm install command throws an error because some dependency needs Python. Using the --virtual flag in the RUN command (part of Alpine´s APK) we can run npm install with Python installed and, after npm install finishes, Python is uninstalled. Apart from the original link on the first comment, here you can find other issues where people realize about missing Python on Alpine: |
The main goals of using alpine images are:
This change would impact on the first point so it would be interesting measure the impact. Apart from this, I don't see any problem.
|
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.
It's ok for me if we agree in looking over the dependencies used in the future
@danielherrerohernando @w3dani @MatteoDiPaolo @Betisman could we merge this and before merge this update the Dockerfile version to at least 12? |
Ok, I see @w3dani already approved it, so I guess we're ready to merge this. |
Well, @kevinccbsg after a second reading of your comment, you're proposing to update the Dockerfile in this same PR and then merge it, right? |
Go ahead guys!!! |
11 months later this PR will be merged, #emotion 😢 |
It took more than deliveringg a baby |
Yes, that's my plan and also update dependencies. |
I cannot modify this branch as it is a PR from another fork so I'm going to merge it |
Using node-alpine, when building a docker image, we are getting an error related to some Python missing dependency, this PR fixes that.
Log with the aforementioned error when building image:
https://drive.google.com/file/d/11kyHQ2nxtnEp-pYW1nQB0SafE9K8bGWT/view?usp=sharing
Further info -> nodejs/docker-node#282
Also this PR adds the .npmrc file (@kevinccbsg )