Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tcorral/docker-npm-registry
A private npm registry based on Docker and Kappa
https://github.com/tcorral/docker-npm-registry
Last synced: 6 days ago
JSON representation
A private npm registry based on Docker and Kappa
- Host: GitHub
- URL: https://github.com/tcorral/docker-npm-registry
- Owner: tcorral
- License: mit
- Created: 2014-03-20T12:29:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-02-18T13:51:44.000Z (almost 11 years ago)
- Last Synced: 2024-04-13T09:19:42.977Z (7 months ago)
- Language: Shell
- Size: 191 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
docker-npm-registry
===================A private npm registry based on Docker and Kappa.
## About
Use this project if you want your own private npm registry without cloning the complete official npm registry database.
See the [Kappa](https://github.com/paypal/kappa) project for more details how this is realized.## Configuration & Usage
You need a Linux machine with Docker installed. See the [Docker website](http://www.docker.io/) for more details.
Fork this repository to make your changes or clone this repository and make your changes directly.
In the file `Dockerfile`, update the variables on lines 9-11 to reflect your own.
On your machine that has Docker installed, run the following commands:
git clone https://github.com/jwvdiermen/docker-npm-registry
cd docker-npm-registry
# Edit Dockerfile if necessary, especially the NPM_VHOST variable.
# sed -i 's/npm\.justdeploy\.eu/npm.example.com/g' Dockerfile
# sed -i 's/your_secret_password/something_more_secure/g' Dockerfile
docker build -rm -t=software/npm-registry .
docker run -name npm-registry-data software/npm-registry trueNow you can start the registry with the following command:
docker run -d -p 80:80 -volumes-from npm-registry-data software/npm-registry
It is probably a good idea to run a reverse proxy in front of your Docker host if you're running multiple webservice containers
and you want to keep them available on port 80.If you want to run the repository on a different port (e.g. 8080), change the first number in the command:
docker run -d -p 8080:80 -volumes-from npm-registry-data software/npm-registry
## Using the registry with the npm client
With the setup so far, you can point the npm client at the registry by
putting this in your `~/.npmrc` file:registry = http://npm.example.com/
You can also set the npm registry config property like:
npm config set registry http://npm.example.com/
Or you can simple override the registry config on each call:
npm --registry http://npm.example.com/ install
Don't forget to add the port number if you're not running on port `80`.