hollaex/hollaex-kit

hollaex-kit-2.3.3 web --build error : build on mac

smartpop-project opened this issue · 3 comments

hollaex web --build
Building the user HollaEx Web image.
Generating .env for Web Client
[+] Building 181.6s (13/17)
=> [internal] load build definition from Dockerfile 0.3s
=> => transferring dockerfile: 120B 0.1s
=> [internal] load .dockerignore 0.4s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/nginx:1.16.0-alpine 2.4s
=> [internal] load metadata for docker.io/library/node:12.22.7-buster 2.5s
=> [internal] load build context 0.3s
=> => transferring context: 243.41kB 0.1s
=> [build 1/6] FROM docker.io/library/node:12.22.7-buster@sha256:e28e02b 0.0s
=> [stage-1 1/6] FROM docker.io/library/nginx:1.16.0-alpine@sha256:270be 0.0s
=> CACHED [stage-1 2/6] RUN apk add --update curl && rm -rf /var 0.0s
=> CACHED [build 2/6] WORKDIR /app 0.0s
=> CACHED [build 3/6] COPY package.json /app/package.json 0.0s
=> CACHED [build 4/6] RUN npm config set unsafe-perm true && npm ins 0.0s
=> CACHED [build 5/6] COPY . /app 0.0s
=> ERROR [build 6/6] RUN npm run build 178.1s

[build 6/6] RUN npm run build:
#11 0.846
#11 0.846 > hollaex-kit@2.3.3 build /app
#11 0.846 > react-scripts --max_old_space_size=8192 build
#11 0.846
#11 6.519 Creating an optimized production build...
#11 176.2 The build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process.
#11 176.4 npm ERR! code ELIFECYCLE
#11 176.4 npm ERR! errno 1
#11 176.4 npm ERR! hollaex-kit@2.3.3 build: react-scripts --max_old_space_size=8192 build
#11 176.4 npm ERR! Exit status 1
#11 176.4 npm ERR!
#11 176.4 npm ERR! Failed at the hollaex-kit@2.3.3 build script.
#11 176.4 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#11 177.9
#11 177.9 npm ERR! A complete log of this run can be found in:
#11 177.9 npm ERR! /root/.npm/_logs/2022-05-24T04_30_23_227Z-debug.log

Dockerfile
ENV NODE_OPTIONS=--max_old_space_size=4096

Most likely your machine does not have enough resources (memory) to build the web. It requires about 8gb RAM to process the build typically.

The cause of the build error was that the docker memory was set too low.
thank you.