FROM node:20-alpine as builder WORKDIR /home/node/app COPY package*.json ./ RUN npm install yarn RUN yarn install && yarn cache clean --force && rm -rf /tmp/* COPY . . # RUN yarn build # FROM base as runtime # ENV NODE_ENV=production # WORKDIR /home/node/app # COPY package*.json ./ # RUN npm install yarn # RUN yarn build # RUN yarn install --production # COPY --from=runtime /home/node/app/dist ./dist # COPY --from=runtime /home/node/app/build ./build EXPOSE 3000 CMD ["node", "run", "dev", "-p", "3000"]