Skip to content

This creates a local npm registry provided by nexus running in a local docker image

Notifications You must be signed in to change notification settings

vaadin-learning-center/docker-nexus-npm-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-nexus-npm-registry

This repository creates a local npm registry provided by nexus running in a local docker image and it should help to reduce internet traffic and built time by downloading redundant npm dependencies.

It contains an extension of the Dockerfile of Nexus3 for Docker's.

Base Docker Image

Installation

  1. Install Docker.

  2. Download the docker-nexus-npm-registry image from public Docker Hub Registry

    $ docker pull sebak/nexus_npm_registry_vaadin

    or, you can build an image from the given Dockerfile:

    $ docker build -t="npm-registry" .

Usage

$ docker run -dit -p 8081:8081 npm-registry

To link npm to your local registry add a configuration to your local npm

$ npm config set registry http://localhost:8081/repository/npmjs-org/

or add frontend-maven-plugin to your project pom. You can find an example project with a proper configuration in the vaadin-example folder.

After setting up the docker image you need to compile a vaadin project on your machine with

$ mvn install -Pproduction --file vaadin-example/pom.xml

TIP: You could add "-Dvaadin.version=<vaadin version no.>" to download the dependencies for a specific vaadin version. Available version numbers of the Vaadin framework can be found here.

Beware, if you want to add web-components to the project later, which are not part of the default web-component set, you need to have a internet connection available to download and add them to your local npm-regsitry.

To check the content of the npm registry you can go to localhost:8081 and login with username "admin" and password "admin".

About

This creates a local npm registry provided by nexus running in a local docker image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published