Skip to content

Instantly share code, notes, and snippets.

@udomsak
Created October 11, 2018 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udomsak/b136b12f43fe3752947cab5ce6b61ec4 to your computer and use it in GitHub Desktop.
Save udomsak/b136b12f43fe3752947cab5ce6b61ec4 to your computer and use it in GitHub Desktop.
verdaccio docker-compose
version: "2"
services:
verdaccio:
image: verdaccio/verdaccio
hostname: npm-registry
ports:
- 4873:4873
# volumes:
# - /etc/verdaccio/conf:/verdaccio/conf
# - /var/cache/verdaccio/storage:/verdaccio/storage
# - /var/cache/verdactio/plugins:/verdaccio/plugins
@udomsak
Copy link
Author

udomsak commented Oct 11, 2018

after verdaccio is running. for developer machine set our private registry

npm set registry http://{ vadaccio ip server}:4873

check configuration

npm config list

result should same like this

c:\Sources\ProjectPor\TestPuppeteer  (testpuppeteer@1.0.0)
λ npm config list
; cli configs
metrics-registry = "http://172.22.17.104:4873/"
scope = ""
user-agent = "npm/5.5.1 node/v9.3.0 win32 x64"

; userconfig C:\Users\SoftSQ-DELL-01\.npmrc
registry = "http://172.22.17.104:4873/"

; globalconfig C:\Users\SoftSQ-DELL-01\AppData\Roaming\npm\etc\npmrc
msvs_version = "2015"
python = "C:\\Python27\\python.exe"

; builtin config undefined
prefix = "C:\\Users\\SoftSQ-DELL-01\\AppData\\Roaming\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = c:\Sources\ProjectPor\TestPuppeteer
; HOME = C:\Users\SoftSQ-DELL-01
; "npm config ls -l" to show all defaults.

Try

mkdir Test && Test

paste below on shell terminal ( linux ) you should get 'package.json' file

cat <<-END_JSON > package.json
{
  "name": "testpuppeteer",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "puppeteer": "^1.9.0"
  }
}
END_JSON

Running

npm install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment