refactor: update Dockerfile cache identifiers and clean up console logs across multiple services
This commit is contained in:
+2
-3
@@ -16,7 +16,7 @@ RUN npm config set registry ${NPM_REGISTRY} \
|
||||
FROM base AS build
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
||||
RUN --mount=type=cache,id=pnpm-store-build,sharing=locked,target=/pnpm/store \
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
@@ -26,9 +26,8 @@ RUN pnpm run build
|
||||
FROM base AS prod-deps
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
||||
RUN --mount=type=cache,id=pnpm-store-prod,sharing=locked,target=/pnpm/store \
|
||||
pnpm install --prod --frozen-lockfile \
|
||||
&& pnpm store prune \
|
||||
&& rm -rf /root/.npm /root/.cache
|
||||
|
||||
FROM node:22-slim AS runtime
|
||||
|
||||
Reference in New Issue
Block a user