Sign inSign up

kmikodev/nexus

By kmikodev

•Updated about 9 years ago

Nexus to node repository

Image
0

966

kmikodev/nexus repository overview

⁠Nexus3 Docker Node

⁠Run

docker run -d -p 8081:8081 --name nexus -v volumen:/nexus-data kmikodev/nexus:0.0.1

⁠Change password

We assume that our docker is running in localhost:8081

Login with admin admin1. The first thing we must do is change the password, for that we access to http://localhost:8081/#user/account⁠ and clic in Change password.


⁠NPM

### Configure server

The purpose of this exercise is to configure a npm repository, this would be the registry that the developers should point to, so it should resolve both our libraries and third parties.

⁠Repositorio privado

This repository will be the one that will contain our libraries, remember that this is a simple example, if necessary you could create as many repositories as logical clusters see. We could have a repository that hosts libraries and another that hosts us components, for example ...

We're going to http://localhost:8081/#admin/repository/repositories⁠, clic to Create new repository -> npm(hosted), we give it a name and we create our repository. If we go to repositories⁠ we will see that we have a new one.

⁠Proxy repository

This repository will download things you can not find in our repository at npm.

We're going to http://localhost:8081/#admin/repository/repositories⁠, clic to Create new repository -> npm(proxy), we give it a name and and url https://registry.npmjs.org/⁠.

⁠Group repository

The end user needs a repository to add to the registry, so we will make a group containing these two. Again we go to repositories⁠ click on Create new repository -> npm (group), we give a name for example npm-group and we assign the repository that we want it to contain.

To resolve the problem of the 401 we go to http://localhost:8081/#admin/security/realms⁠ and enable npm Bearer Token Realm

⁠Configure client

To access our repository

  npm config set registry http://localhost:8081/repository/npm-group

based on Sonatype Nexus3 Docker: sonatype/nexus3 Original Nexus Repository Docker⁠

Tag summary

Content type

Image

Digest

Size

224.2 MB

Last updated

about 9 years ago

docker pull kmikodev/nexus