docker npm install ERR

  docker, node.js, npm, npm-install, proxy

I have no proxy on my router and when I’m trying to build my react image the logs of npm tell me to check my proxy configuration.

It work when I’m using my phone connection but not with my router and I need it to work with my router

logs from npm install –verbose running inside of docker image build :

npm timing command:install Completed in 283380ms
npm notice 
npm notice New minor version of npm available! 7.11.2 -> 7.12.1
npm notice Changelog: <>
npm notice Run `npm install -g [email protected]` to update!
npm notice 
npm verb stack Error: aborted
npm verb stack     at connResetException (node:internal/errors:683:14)
npm verb stack     at TLSSocket.socketCloseListener (node:_http_client:407:19)
npm verb stack     at TLSSocket.emit (node:events:377:35)
npm verb stack     at node:net:661:12
npm verb stack     at TCP.done (node:_tls_wrap:578:7)
npm verb cwd /usr/src/frontend_mak
npm verb Linux 5.8.0-53-generic
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--verbose"
npm verb node v16.1.0
npm verb npm  v7.11.2
npm ERR! network aborted
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm verb exit 1
npm timing npm Completed in 306313ms
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-05-13T15_28_07_651Z-debug.log

my Docker file

FROM node:16.1-alpine3.11                                                                  
WORKDIR /usr/src/frontend_mak                                                              
ENV PATH /usr/src/frontend_mak/node_modules/.bin:$PATH                                     
COPY package.json ./                                                                       
 COPY package-lock.json ./                                                                  
RUN npm install --verbose                                                                  
RUN npm install [email protected] -g                                                     
COPY . ./                                                                                  

CMD ["npm", "start"]    

Source: Docker Questions