Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a55649c5f2 |
@@ -4,15 +4,24 @@ RUN apk add --no-cache libc6-compat curl
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN corepack enable pnpm
|
RUN corepack enable pnpm
|
||||||
|
|
||||||
# Copy source (honoring .dockerignore)
|
# Copy manifest files specifically for better layer caching
|
||||||
COPY . .
|
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./
|
||||||
|
COPY packages/gatekeeper/package.json ./packages/gatekeeper/package.json
|
||||||
|
COPY packages/next-utils/package.json ./packages/next-utils/package.json
|
||||||
|
COPY packages/eslint-config/package.json ./packages/eslint-config/package.json
|
||||||
|
COPY packages/next-config/package.json ./packages/next-config/package.json
|
||||||
|
COPY packages/tsconfig/package.json ./packages/tsconfig/package.json
|
||||||
|
|
||||||
# Use a secret for NPM_TOKEN to authenticate with private registry
|
# Use a secret for NPM_TOKEN and a cache mount for the pnpm store
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store/v3 \
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
--mount=type=secret,id=NPM_TOKEN \
|
--mount=type=secret,id=NPM_TOKEN \
|
||||||
export NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) && \
|
export NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) && \
|
||||||
|
pnpm config set store-dir /pnpm/store && \
|
||||||
pnpm i --frozen-lockfile
|
pnpm i --frozen-lockfile
|
||||||
|
|
||||||
|
# Copy the rest of the source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
# Build Gatekeeper and its dependencies
|
# Build Gatekeeper and its dependencies
|
||||||
RUN pnpm --filter @mintel/gatekeeper... build
|
RUN pnpm --filter @mintel/gatekeeper... build
|
||||||
RUN mkdir -p packages/gatekeeper/public
|
RUN mkdir -p packages/gatekeeper/public
|
||||||
|
|||||||
Reference in New Issue
Block a user