I'm on Windows 10
I'm on a new project and I can't use npm install and npm audit fix on docker-compose up -d, so it's stuck on the first npm install
NPM is working locally with my configured proxy :
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
I tried to configure docker proxy, windows proxy and npm proxy, and to npm install manually folder and it's working without docker
I tried on Linux and on other computer too, and it's not working too
Node version is : v10.15.0
Npm version is : 6.9.0
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/cors failed, reason: connect ECONNREFUSED ip.ip.ip.ip:443
npm ERR! at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
npm ERR! at ClientRequest.emit (events.js:196:13)
...
I can provide the full error
I think it's a proxy problem but I can't understand why and how I can try something else
On another network I can docker-compose up -d without any problems
E: I tried without results :
ENV HTTP_PROXY "http://proxy.company.com:8080"
and configure .docker/config.json
http://proxy.company.com:8080
could not resolved by your docker network.you should run your docker with the same network interface as your host machine
by passing --network host to your docker run command
I had to configure container proxy with a JSON file /.docker/config.json like :
{
"proxies":
{
"default":
{
"httpProxy": "http://username:password@PROXY_IP:port",
"httpsProxy": "http://username:password@PROXY_IP:port",
"noProxy": "noproxiesinformation"
}
}
}
So configure Docker proxy and Docker container proxy and it's working