最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - Node_modules are not installing in my directory after running "RUN yarn" in my Docker-File - Stack O

programmeradmin3浏览0评论

I am currently using Docker container to run my Backend code. But node modules are not installed even my Docker-file has "RUN yarn" command. This is my Docker-File

FROM node:18-alpine3.18

RUN mkdir -p /usr/node/app/logs
RUN chmod -R 777 /usr/node/app
WORKDIR /usr/node/app
COPY ./package*.json yarn* ./
RUN yarn
COPY . .
RUN yarn postinstall

RUN mkdir -p ./src/plugins/anization/
COPY /src/plugins/anization ./src/plugins/anization/
WORKDIR /usr/node/app/src/plugins/anization
COPY /src/plugins/anization/package*.json yarn* ./
RUN yarn
RUN yarn build
COPY . .
WORKDIR /usr/node/app
ENV NODE_ENV production
EXPOSE 1337
CMD yarn build && yarn start

I used the same Docker-file to run the application a few months before. It worked fine. But now the node modules are not installing properly.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论