Problems with npm install in docker #6765
Unanswered
dioubernardo
asked this question in
Q&A
Replies: 2 comments 3 replies
-
@dioubernardo is there a reason why your making a volume to your node modules but also trying to npm install the container? I would remove the volume and remove the Context: My [email protected] server is running in docker just fine with no problems at all. Although im not using docker compose. I would also try just running a regular docker build to see if the problem is with compose itself |
Beta Was this translation helpful? Give feedback.
2 replies
-
I also dont see you coping the app either which will be your next problem 😃 FROM node:22-alpine
WORKDIR /app
COPY package*.json .
RUN npm install --no-update-notifier
COPY . . # <----- your missing this
EXPOSE 80
CMD ["npm", "start"] |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Simple test application generated with npm init and npm install
In Dockerfile
In docker compose
When running docker compose build, npm install runs for a few minutes and issues the following error:
Beta Was this translation helpful? Give feedback.
All reactions