I have this Dockerfile:
FROM node:argon
ENV http_proxy http://user:pass@proxy.company.priv:3128
ENV https_proxy https://user:pass@proxy.company.priv:3128
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install
# Bundle app source
COPY . /usr/src/app
EXPOSE 8080
CMD [ "npm", "start" ]
But I get this error, in npm install step:
npm info it worked if it ends with ok npm info using npm@2.14.12 npm info using node@v4.2.6 npm WARN package.json deployer-ui@1.0.0 No description npm WARN package.json deployer-ui@1.0.0 No repository field. npm WARN package.json deployer-ui@1.0.0 No README data npm info preinstall deployer-ui@1.0.0 npm info attempt registry request try #1 at 7:09:23 AM npm http request GET https://registry.npmjs.org/body-parser npm info attempt registry request try #1 at 7:09:23 AM npm http request GET https://registry.npmjs.org/express npm info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=write EPROTO npm info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=write EPROTO
I guess it is due to the proxy. I have also tried to put
RUN npm config set proxy http://user:pass@proxy.company.priv:3128
RUN npm config set https-proxy http://user:pass@proxy.company.priv:3128
but still getting the same error.
Moreover, in my file /etc/systemd/system/docker.service.d/http-proxy.conf I have this:
Environment="HTTP_PROXY=http://user:pass@proxy.company.priv:3128"
Environment="HTTPS_PROXY=https://user:pass@proxy.company.priv:3128"
Thanks in advance.