This is my dockerfile. When i run this in local or VPS, it run completely fine.
FROM node:21.1.0
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
RUN npm run build
RUN rm -fr node_modules
COPY . .
EXPOSE 3000
CMD ["npm", "start"]
But problem occur, when i run it with Jenkins in “build” stage. “RUN npm install” run forever, approximately 8 hours it still run “RUN npm install”.
“RUN npm install”
This is my Jenkinsfile
Jenkinsfile
I tried downgrade version of node in Dockerfile, But still not working.
I took me whole week, and can’t deal with it. Can you help me about this problem?. Thanks for reading, and I’m so sorry for my bad english :<.
2