0

I am trying to download and install nodejs in a dockerfile. It works when run below i commands in dockerfile -

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - RUN apt-get install -y nodejs

but as per my company policy, i need to use nexus for any third party component and i need to download Nodejs thru nexus. Can someone help me how can i do it.

How can i replace https://deb.nodesource.com/ with https://comoany-nexus.com/repository/ or is there any other way like using APIs or Hosting package to proxy.

Note - nexus version is - version 3.30.1-01 Edition PRO

1 Answers1

0

You can set the custom registry to your company's nexus by having .npmrc config file in the root directory of your project.

https://docs.npmjs.com/cli/v8/configuring-npm/npmrc

file: .npmrc

; Set a new registry for a scoped package
registry=https://mycustomregistry.example.org
KayD
  • 746
  • 5
  • 15