NPM install via git+https//x-oauth-basic within Docker container fails

I have a node project that I have stood up on my host server (Ubuntu 14.04), I can pull my repo and perform the NPM install without issue on the host. My package.json includes some private repos where we use the with https to have npm pull in our private dependencies.

like so in our “dependencies” in our package.json:

  • Docker Stack deployment app does not work
  • dial tcp: lookup no such host
  • Is it a good idea to run Cassandra inside an LXC or Docker, in production?
  • MariaDB never starts within docker image
  • Assigning Public IP to SQL Server Docker Image
  • Docker Error archive/tar: invalid tar header

  • "local_utils": "git+",

    I’m trying to run this same application from within a docker container, but on build of our docker image the npm install fails on our private repo calls. It throws an error:

    Failed to connect to port 443: Connection timed out

    The normal dependencies in NPM all work fine from within the container. What is causing the error to our private repos?

  • Nginx and Docker - how to configure hosts
  • collectd data not showing in influxdb container
  • How do I attach to an existing docker-machine (Azure)?
  • cannot connect on SQLserver with Docker on mac
  • Why I can't touch file when the docker image has volume?
  • Linux command output as input at particular location of another command.?
  • One Solution collect form web for “NPM install via git+https//x-oauth-basic within Docker container fails”

    As suspected, outbound access to GitHub was being blocked by the server:

    “Yup you guessed it, I added my ENV http_proxy to my Dockerfile and it worked. I had configured NPM in the container to use the proxy but I didn’t realize I needed to set it for the container as well.”

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.