From 938dc7249d48ea4168fa3c78a97bcd4d492633d8 Mon Sep 17 00:00:00 2001 From: Fernando Zavalia <24811313+fzavalia@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:31:07 -0300 Subject: [PATCH] fix: --maxSockets (#363) --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d661338..cb872413 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ RUN apk add --no-cache py3-setuptools python3-dev build-base # install dependencies COPY package.json /app/package.json COPY package-lock.json /app/package-lock.json -RUN npm ci +# --maxsockets=5 is used to avoid "EMFILE: too many open files" error +RUN npm ci --maxsockets=5 # build the app COPY . /app @@ -19,7 +20,8 @@ RUN npm run build RUN npm run test # remove devDependencies, keep only used dependencies -RUN npm ci --only=production +# --maxsockets=5 is used to avoid "EMFILE: too many open files" error +RUN npm ci --only=production --maxsockets=5 FROM node:18-alpine