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
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:
+7
-5
@@ -1,3 +1,4 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
###############
|
||||
### STAGE 1: Build app
|
||||
###############
|
||||
@@ -37,12 +38,13 @@ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
||||
|
||||
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
|
||||
RUN npm config set registry $NPM_REGISTRY_URL --location=global
|
||||
|
||||
RUN npm ci
|
||||
# BuildKit cache mount: npm ka download cache builds ke beech persist hota hai,
|
||||
# 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 --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
|
||||
|
||||
RUN sh -c "ng build --output-path=/dist $BUILD_ENVIRONMENT_OPTIONS"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user