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:

  • how can I login to docker hub via Vagrant docker provisioner
  • Is it possible to run kubernetes as a docker container?
  • OpenShift and persistent Redis config
  • Nginx proxy with Docker containers
  • Scala SBT set dockerRepository “Repository for publishing is not specified”
  • chef-server stuck ruby_block[supervise_rabbitmq_sleep] when running reconfigure

  • "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?

  • How to specify different .dockerignore files for different builds in the same project?
  • Create ssh tunnel to remote docker container running Jupyter Notebook
  • Using confluent-kafka python client in alpine container
  • Python dependency issues with Django on Docker
  • How to give non-root user in Docker container access to a volume mounted on the host
  • Gitlab CI runner unabled to shared build sources on docker executor
  • 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.