Skip to content

zzswang/docker-cnpmjs.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker for cnpmjs.org

What is this?

This a docker repository for the offical cnpmjs.org project. which provide a quick deployment for private npm server.

Get more detail from cnpmjs.org repo

Quick start

1. run the simple one

docker run -d --name mycnpmjs.org -p 7001:7001 -p 7002:7002 zzswang/docker-cnpmjs.org

note: It will start the pre-configured cnpmjs.org server. You could use open http://localhost:7002 to visit the homepage.

Use following command to connect your local npm client to this server.

npm install -g cnpm
cnpm set registry http://localhost:7001  // the default registry for cnpm: https://registry.npm.taobao.org
cnpm login
## Username: dev
## Password: ***
## Email: (this IS public) [email protected]

2. run with your own config.json and data backup

First you should prepare a config.json file for yourself. the default one in this docker is:

{
  "admins": {
    "dev": "[email protected]"
  },
  "scopes": [
    "@36node"
  ],
  "enablePrivate": true,
  "bindingHost": "0.0.0.0"
}

There are more configs, please read the config file in offical repo

Prepare a folder, like /data, and put your config.json into it. Then start the docker like:

docker run -d --name mycnpmjs.org -p 7001:7001 -p 7002:7002 -v /data:/data/.npmjs.org zzswang/docker-cnpmjs.org

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published