#9 11.82 npm ERR! code ENOENT #9 11.83 npm ERR! path git #9 11.83 npm ERR! errno -2 #9 11.83 npm ERR! enoent Error while executing: #9 11.83 npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git #9 11.83 npm ERR! enoent #9 11.83 npm ERR! enoent #9 11.83 npm ERR! enoent This is related to npm not being able to find a file. #9 11.85 #9 11.85 npm ERR! A complete log of this run can be found in: #9 11.85 npm ERR! /root/.npm/_logs/2020-11-10T14_49_13_350Z-debug.log
이거로 한참을 헤매었다.... 아오~
FROM node:14.15-alpine WORKDIR /app COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] RUN npm install COPY . . EXPOSE 3000 CMD ["npm", "start"]
dockerfile이다... 별 문제 없어 보인다. 그러니 저런 에러가 나오면 멘붕이지...
alpine 이미지의 특성인지는 모르겠지만 "git@github.com/eligrey/FileSaver.js.git" 이 repository를 땡겨오는데 문제가 생겼고 path git 이라는 문구도 보인다... 설마설마... alpine에 git이 없나??? (npm install인데 git에서도 땡겨오는지는 몰랐음....)
RUN git --verion을 추가하기에 이르렀다. 예상대로 git 명령어 없음.
RUN npm install 전에 아래 추가하여 git 설치 했더니 문제 없이 docker image가 build되었다.
RUN apk update && apk upgrade && apk add --no-cache bash git openssh
'Operating System > Docker | Kubernetes' 카테고리의 다른 글
docker-compose react sh: react-scripts: not found (0) | 2020.09.19 |
---|---|
docker-compose mysql Connection refused (2) | 2020.09.18 |