вот мой Dockerfile < /p>
Код: Выделить всё
FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
RUN yarn
RUN npx nx build api --production=true
FROM node:20-alpine AS runner
WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/yarn.lock ./
RUN yarn install --production
RUN yarn add sharp --ignore-engines
COPY --from=builder /app/dist/apps/api ./
ARG PORT=3333
ENV PORT=${PORT}
EXPOSE ${PORT}
CMD [ "node", "main" ]
Подробнее здесь: https://stackoverflow.com/questions/797 ... 64-runtime