I made 2 docker images from 2 folder in
To reproduce the error, clone the repo and run sudo docker-compose -f docker-compose.yaml up
CodePudding user response:
You didn't specify the working directory in your dockerfile and that's why the package.json
cannot be found.
Ref: https://docs.docker.com/engine/reference/builder/#workdir
add WORKDIR before RUN npm install
WORKDIR /home/app
RUN npm install