<p>In my local machine, I can build the image from the Dockerfile of my Nodejs Project. But I cloned that project inside <strong>AWS EKS's worker node</strong> and tried to build the image but it did not work. (<strong>Note</strong>: <code>*the reason that I ran the docker build on a worker node, previous I tried to build an image inside Jenkins and it gives the same result as what I got the error inside worker nodes*</code>).</p>

<p>Error: </p>

<pre><code>docker build -t crmproxy .

Sending build context to Docker daemon  1.451MB

Step 1/9 : FROM node:8
 ---&gt; c83f74dcf58e
Step 2/9 : WORKDIR /usr/src/app
 ---&gt; Using cache
 ---&gt; 1f9b76a60013
Step 3/9 : COPY package*.json ./
 ---&gt; b2ca6505fed4
Step 4/9 : RUN npm install
 ---&gt; Running in 39aae0cbd868
[91mnpm ERR! cb() never called!
[0m[91m
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     &lt;https://npm.community&gt;
</code></pre>

<p>First time when I got this error, I googled this error, I thought it was because of <strong>ULIMIT</strong> not enough. But It could not fix that error by increasing <strong>ULIMIT</strong>. This my previous <a href="https://stackoverflow.com/questions/57621767/docker-service-wont-run-inside-container-error-ulimit-error-setting-limit">StackOverflow Question</a></p>

<p>So that's why I tried to test docker build in worker nodes. inside EKS worker nodes, im getting the same error. I can build the image in my local machine and normal ec2 instances where docker installed.</p>

<p>Dockerfile :</p>

<pre><code>FROM node:8

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 3002

CMD npm start
</code></pre>

<p>Any help would be appreciated!</p>

Sarasa Gunawardhana
<p>Try using this dockerfile     </p>

<pre><code>FROM node:8

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm cache verify &amp;&amp; npm install

COPY . .

EXPOSE 3002

CMD npm start
</code></pre>

<p>if still not work try clearing <code>npm cache clean -f</code> &amp; <code>npm update</code> i think it's npm version issue may be.</p>

<p>you can update the npm using <code>npm i -g npm</code></p>
