Skip to content

Commit

Permalink
Include pnpm workspace file when installing and building
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Oct 4, 2024
1 parent ba376ae commit e799878
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ WORKDIR /app
RUN corepack enable

FROM builder-base AS builder-viewer
COPY pnpm-lock.yaml pnpm-workspace.yaml /app/
WORKDIR /app/viewer
COPY viewer/package.json viewer/pnpm-lock.yaml viewer/.npmrc /app/viewer/
COPY viewer/package.json viewer/.npmrc /app/viewer/
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install

COPY ./viewer /app/viewer
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm run build

FROM builder-base AS builder

COPY package.json pnpm-lock.yaml /app/
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml /app/
COPY viewer/package.json /app/viewer/
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install

COPY . /app/
Expand Down

0 comments on commit e799878

Please sign in to comment.