Skip to content

Commit

Permalink
build: remove NODE_OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
QuCMGisaia committed Dec 19, 2024
1 parent d6c657f commit f686d81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### 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 ./
COPY ./package-lock.json ./

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app
RUN npm i --ignore-scripts && npm run postinstall && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app
COPY ./scripts/fetch-conf-by-http.sh ./ng-app
Expand All @@ -19,7 +19,7 @@ WORKDIR /ng-app
COPY . .

## Build the angular app in production mode and store the artifacts in dist folder
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm run build
RUN npm run build

### STAGE 2: Setup ###

Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile-production
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### 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 ./
COPY ./package-lock.json ./

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app
RUN npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app
COPY ./scripts/fetch-conf-by-http.sh ./ng-app
Expand All @@ -19,7 +19,7 @@ WORKDIR /ng-app
COPY . .

## Build the angular app in production mode and store the artifacts in dist folder
RUN export NODE_OPTIONS=--max_old_space_size=8192 && $(npm bin)/ng build --configuration production --aot --base-href='$ARLAS_WUI_BASE_HREF/'
RUN npm run build

### STAGE 2: Setup ###

Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile-production-no-analytics
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### 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 ./
COPY ./package-lock.json ./

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN export NODE_OPTIONS=--max_old_space_size=8192 && npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app
RUN npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app

COPY ./scripts/start.sh ./ng-app
COPY ./scripts/fetch-conf-by-http.sh ./ng-app
Expand All @@ -19,7 +19,7 @@ WORKDIR /ng-app
COPY . .

## Build the angular app in production mode and store the artifacts in dist folder
RUN export NODE_OPTIONS=--max_old_space_size=8192 && $(npm bin)/ng build --configuration production-no-analytics --aot --base-href='$ARLAS_WUI_BASE_HREF/'
RUN npm run build

### STAGE 2: Setup ###

Expand Down

0 comments on commit f686d81

Please sign in to comment.