fix(docker): drop shared npm cache mount and skip husky postinstall
This commit is contained in:
+3
-3
@@ -9,11 +9,11 @@ WORKDIR /app
|
||||
|
||||
# Root deps
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
|
||||
RUN npm ci --no-audit --no-fund --ignore-scripts
|
||||
|
||||
# Client deps
|
||||
COPY client/package.json client/package-lock.json* ./client/
|
||||
RUN --mount=type=cache,target=/root/.npm npm --prefix client ci --no-audit --no-fund
|
||||
RUN npm --prefix client ci --no-audit --no-fund --ignore-scripts
|
||||
|
||||
# Source
|
||||
COPY tsconfig.json ./
|
||||
@@ -33,7 +33,7 @@ WORKDIR /app
|
||||
|
||||
# Only ship the prod deps + built artefacts
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev --no-audit --no-fund \
|
||||
RUN npm ci --omit=dev --no-audit --no-fund --ignore-scripts \
|
||||
&& npm cache clean --force
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
Reference in New Issue
Block a user