pacificclimate / scip-frontend

Salmon Climate Impacts Portal
GNU General Public License v3.0
1 stars 1 forks source link

pre-installed npm proxy can block build on internal docker server #31

Closed corviday closed 1 year ago

corviday commented 1 year ago

I got this error building the container on docker-dev02:

npm ERR! code ECONNRESET
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'

which was solved by adding these lines to the dockerfile before npm install

RUN npm config get proxy
RUN npm config rm proxy
RUN npm config rm https-proxy

This implies that the base npm+node image we are using comes with a preconfigured proxy, which needs to be removed before we can use npm.

This may not be an issue once we are set up on dockerhub, but until then, it might be nice to add these lines to the dockerfile.

Rishav1707 commented 1 year ago

Shall I work on this issue?