MirrorNest
← すべてのガイド

Verdaccio

Verdaccio is a lightweight, zero-configuration private npm registry that can proxy the public npm registry while hosting your own private packages, with its own small file-based storage.

対象: Any Docker host (or any Node.js host)DevOps公式ホームページ ↗公式ドキュメント ↗
このガイドは上記リンク先にあるVerdaccio公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
  1. 1Run Verdaccio

    Either the official Docker image, or a global npm install, will start a working registry with no configuration required.

    docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio

    Alternative: npm install -g verdaccio && verdaccio

  2. 2Persist storage and config

    services: verdaccio: image: verdaccio/verdaccio container_name: verdaccio ports: - "4873:4873" volumes: - verdaccio_storage:/verdaccio/storage - verdaccio_conf:/verdaccio/conf - verdaccio_plugins:/verdaccio/plugins volumes: verdaccio_storage: verdaccio_conf: verdaccio_plugins:

  3. 3Point npm at your registry

    npm set registry http://localhost:4873/
  4. 4Create your first user

    npm adduser --registry http://localhost:4873

    Verdaccio stores accounts in an htpasswd file created on first use; there's no separate admin setup step.

  5. 5Publish a package

    npm publish