diff --git a/Dockerfile b/Dockerfile index d6202ff0..f4987bd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ ### STAGE 1: Build ### # We label our stage as 'builder' -FROM node:18.20.5 as builder +FROM node:18.20.5 AS builder COPY package.json package-lock.json ./ ## Storing node modules on a separate layer will prevent unnecessary npm installs at each build -RUN export NODE_OPTIONS=--max_old_space_size=6144 && npm install && mkdir /ng-app && cp -R ./node_modules ./ng-app +RUN npm i --ignore-scripts && mkdir /ng-app && cp -R ./node_modules ./ng-app COPY ./scripts/start.sh ./ng-app diff --git a/package.json b/package.json index 8f37ac49..1c6debdf 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "ng": "ng", "postinstall": "patch-package --patch-dir ./node_modules/arlas-web-core/patches && patch-package --patch-dir node_modules/arlas-d3/patches", "start": "ng serve", - "build": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --configuration production --aot --base-href='$ARLAS_BUILDER_BASE_HREF/'", + "build": "ng build --configuration production --aot --base-href='$ARLAS_BUILDER_BASE_HREF/'", "build:stats": "ng build --stats-json", "test": "ng test", "lint": "ng lint",