generator-fountain-vue
generator-fountain-vue copied to clipboard
Dockerfile build fails in 'RUN npm install' step *git clone command
Description
docker build -t vue-app .
When building a docker image from generated Dockerfile, it fails in step # 4 attempting to install npm via git repo (error output below)
An additional command (to install git) is required to be able to proceed;
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
Error output
Step 4/5 : RUN npm install
---> Running in a28fdedd2f4a
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror [email protected]:gulpjs/gulp.git /root/.npm/_git-remotes/git-github-com-gulpjs-gulp-git-4ed9a4a3275559c73a396eff7e1fde3824951ebb-7c06e801: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror [email protected]:gulpjs/gulp.git /root/.npm/_git-remotes/git-github-com-gulpjs-gulp-git-4ed9a4a3275559c73a396eff7e1fde3824951ebb-7c06e801: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror [email protected]:frankwallis/gulp-hub.git /root/.npm/_git-remotes/git-github-com-frankwallis-gulp-hub-git-d461b9c700df9010d0a8694e4af1fb96d9f38bf4-41f2d061: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror [email protected]:frankwallis/gulp-hub.git /root/.npm/_git-remotes/git-github-com-frankwallis-gulp-hub-git-d461b9c700df9010d0a8694e4af1fb96d9f38bf4-41f2d061: undefined
npm ERR! Linux 4.9.27-moby
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/app/npm-debug.log
Environment: MacOS Sierra Docker version 17.03.1-ce, build c6d412e Node v6.11.0 NPM v5.0.3 Yeoman v2.0.0
Dockerfile FROM mhart/alpine-node:6 WORKDIR /opt/app ADD . /opt/app RUN npm install CMD ["npm","test"]
FROM node:6.10.0-alpine WORKDIR /app COPY package.json /app RUN npm install
COPY . /app EXPOSE 3000 CMD ["npm", "start"]
same for me
@daxeh @stychu did you guys figure out how to fix this?if yes please direct me on the fix or workaround i am stuck at this same issue now.