npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
Looks like it's missing from the current alpine image.
npm install is kinda fundamental to node and git is required to install certain dependencies.
Including
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
in the dockerfile will fix it.
There was a discussion about this here: https://github.com/nodejs/docker-node/pull/367
If you only need it for npm, you should use a multi-stage build.
I don't think anything has changed from our side since #367, so closing
If anyone need to use node (alpine) with git, take a look into this repository: https://github.com/tarampampam/node-docker
RUN apk add --no-cache git
@alexisdiel what if we do not have permissions to install using apk? Is there an alpine binary we could grab?
@JeremyCraigMartinez are you able to compile from source?
RUN apk add --no-cache git
still the same error this dude is getting. alpine is complete shit
Hi, @NuKESec this sort of comment is entirely inappropriate in the Node.js organization repo. Please see our code of conduct on how to conduct yourself inside the organisation.
RUN apk add --no-cache git=2.22.2-r0 \
--repository https://alpine.global.ssl.fastly.net/alpine/v3.10/community \
--repository https://alpine.global.ssl.fastly.net/alpine/v3.10/main
The problem could be the user in Dockerfile. Looks like it requires to be installed by root.
Most helpful comment
RUN apk add --no-cache git