Cache npm downloads via BuildKit mount, drop cache-clear (faster npm ci)
continuous-integration/drone/push Build is passing
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s
Tests / testRigor (push) Canceled after 0s

This commit is contained in:
satyamsingh_8888
2026-09-14 16:16:54 +05:30
parent b0d72d16f3
commit c0f96e401f
+7 -5
View File
@@ -1,3 +1,4 @@
# syntax=docker/dockerfile:1
############### ###############
### STAGE 1: Build app ### STAGE 1: Build app
############### ###############
@@ -37,12 +38,13 @@ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
COPY ./ /usr/src/app/ COPY ./ /usr/src/app/
RUN npm cache clear --force RUN npm config set fetch-retry-maxtimeout 120000 \
&& npm config set registry $NPM_REGISTRY_URL --location=global
RUN npm config set fetch-retry-maxtimeout 120000 # BuildKit cache mount: npm ka download cache builds ke beech persist hota hai,
RUN npm config set registry $NPM_REGISTRY_URL --location=global # isliye har build par saare packages dobara download nahi hote (bahut fast).
# 'npm cache clear --force' hata diya — wo har build par cache wipe kar deta tha.
RUN npm ci RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
RUN sh -c "ng build --output-path=/dist $BUILD_ENVIRONMENT_OPTIONS" RUN sh -c "ng build --output-path=/dist $BUILD_ENVIRONMENT_OPTIONS"