I want to build a Docker image from a Dockerfile in my React App (I'm on a Windows PC using Linux container), but I get the error executor failed running [/bin/sh -c npm install --silent]: exit code: 1
My Dockerfile :
FROM node:alpine
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install app dependencies
COPY package.json ./
COPY package-lock.json ./
RUN npm install react-scripts@3.4.1 -g --silent
RUN npm install npm@9.3.1 -g --silent
RUN npm install --silent
# add app
COPY . ./
# start app
CMD ["npm", "start"]
Logs
npm notice
npm notice New minor version of npm available! 9.2.0 -> 9.3.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.3.1>
npm notice Run `npm install -g npm@9.3.1` to update!
npm notice
The command '/bin/sh -c npm install react-scripts@3.4.1 -g --silent' returned a non-zero code: 4294967295: failed to shutdown container: container 5e7d0556df544832e3d6f1b1d0a872b229214cf124759dbc6faddbd782901fb0 encountered
an error during hcsshim::System::waitBackground: failure in a Windows system call: Le conteneur ou la machine virtuelle avec l'identificateur spécifié n'est pas en cours d'exécution. (0xc0370110): subsequent terminate failed container 5e7d0556df544832e3d6f1b1d0a872b229214cf124759dbc6faddbd782901fb0 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: Le conteneur ou la machine virtuelle avec l'identificateur spécifié n'est pas en cours d'exécution. (0xc0370110)