COPY --from=build-runner /tmp/app/node_modules /app/node_modules
## build runnerFROM node:lts-alpine as build-runner# Set temp directoryWORKDIR /tmp/app# Move package.json and yarn.lockCOPY package.json yarn.lock ./# Install dependenciesRUN yarn install --frozen-lockfile# Move source filesCOPY src ./srcCOPY tsconfig.json .COPY prisma ./prisma# Generate Prisma ClientRUN npx prisma generate# Build projectRUN yarn run build## production runnerFROM node:lts-alpine as prod-runner# Set work directoryWORKDIR /app# Copy package.json from build-runnerCOPY --from=build-runner /tmp/app/package.json /app/package.jsonCOPY --from=build-runner /tmp/app/yarn.lock /app/yarn.lock# Move build filesCOPY --from=build-runner /tmp/app/build /app/build# Start botCMD [ "yarn", "run", "start" ]
RUN yarn install --frozen-lockfile
## build runnerFROM node:lts-alpine as build-runner# Set temp directoryWORKDIR /tmp/app# Move package.json and yarn.lockCOPY package.json yarn.lock ./# Install dependenciesRUN yarn install# Move source filesCOPY src ./srcCOPY tsconfig.json .COPY prisma ./prisma# Generate Prisma ClientRUN npx prisma generate# Build projectRUN yarn run build## production runnerFROM node:lts-alpine as prod-runner# Set work directoryWORKDIR /app# Copy package.json from build-runnerCOPY --from=build-runner /tmp/app/package.json /app/package.jsonCOPY --from=build-runner /tmp/app/yarn.lock /app/yarn.lock# Move build filesCOPY --from=build-runner /tmp/app/build /app/build# Start botCMD [ "yarn", "run", "start" ]