fix(docker): try to enable pnpm globally first

This commit is contained in:
Paul Makles 2022-09-19 14:40:53 +01:00
parent d9694ecd24
commit 4a21d34891

View file

@ -4,12 +4,13 @@ WORKDIR /usr/src/app
COPY . . COPY . .
COPY .env.build .env COPY .env.build .env
RUN corepack pnpm install --frozen-lockfile RUN corepack prepare pnpm --activate
RUN corepack pnpm build:deps RUN pnpm install --frozen-lockfile
RUN corepack pnpm typecheck RUN pnpm build:deps
RUN NODE_OPTIONS='--max-old-space-size=4096' corepack pnpm build RUN pnpm typecheck
RUN NODE_OPTIONS='--max-old-space-size=4096' pnpm build
RUN find . -name "node_modules" -type d -prune RUN find . -name "node_modules" -type d -prune
RUN corepack pnpm install --prod RUN pnpm install --prod
FROM node:16-alpine FROM node:16-alpine
WORKDIR /usr/src/app WORKDIR /usr/src/app