docker run -d -p 8081:8081 --name nexus -v volumen:/nexus-data kmikodev/nexus:0.0.1
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.
### 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.
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.
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/.
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
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
Content type
Image
Digest
Size
224.2 MB
Last updated
about 9 years ago
docker pull kmikodev/nexus