Недавно мои приложения Heroku Review, использующие Docker, прекратили сборку.Ранее они вели себя, как и ожидалось, но теперь кажется, что npm не может найти git в PATH.
Моим первым предположением было то, что по какой-то причине мне теперь нужно установить git в carbon-alpine.Посмотрите мою попытку ниже, где я добавил 'RUN npm install --no-cache git'
Любая помощь будет принята с благодарностью!Мне также очень нравится знать, почему он ведет себя так, как ожидалось.
Dockerfile-heroku
FROM node:carbon-alpine
WORKDIR /usr/app
COPY . .
# Build Angular
RUN npm install --no-cache git
RUN npm install
RUN npm run build
WORKDIR ./server
# Build Webserver
RUN npm install
RUN npm run build
CMD ["node", "./bin/www"]
Сообщение об ошибке
Step 4/9 : RUN npm install
---> Running in f8800495a4ab
npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git
npm ERR!
npm ERR! undefined
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.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-12-28T13_15_27_080Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1