Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

457
Views
package.json not found in node:13-alpine docker container

I made 2 docker images from 2 folder in this repo. The dockerfile was:

FROM node:13-alpine
EXPOSE 5000
RUN mkdir /app
RUN mkdir -p /home/app
COPY . /home/app
RUN npm install
CMD ["npm","run","start"]

But the docker logs showed that the package.json file was not found and hence the containers closed, I can't even enter the terminal of the containers to see the available files.

The error output is in the below image.

enter image description here

To reproduce the error, clone the repo and run sudo docker-compose -f docker-compose.yaml up

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!