適用於 Node.js 的 Azure Container Registry 模組Azure Container Registry modules for Node.js

Azure Container Registry 是受控 Docker 登錄服務,架構於開放原始碼的 Docker Registry 2.0。Azure Container Registry is a managed Docker registry service based on the open-source Docker Registry 2.0. 建立及維護 Azure 容器登錄庫,以儲存和管理您的私人 Docker 容器映像。Create and maintain Azure container registries to store and manage your private Docker container images. 使用 Azure 的容器登錄庫進行現有容器的開發與部署管線,並利用 Docker 社群的專業知識。Use container registries in Azure with your existing container development and deployment pipelines, and draw on the body of Docker community expertise.

管理套件Management Package

安裝 npm 模組Install the npm module

安裝 Azure Container Registry npm 模組Install the Azure container registry npm module

npm install azure-arm-containerregistry

範例Example

此範例會取得可用容器的清單。This example gets a list of the available containers.

const msRestAzure = require('ms-rest-azure');
const ContainerRegistryManagement = require('azure-arm-containerregistry');

const subscriptionId = 'your-subscription-id';

msRestAzure
  .interactiveLogin()
  .then(credentials => {
    const manager = new ContainerRegistryManagement(
      credentials,
      subscriptionId
    );
    return manager.registries.list();
  })
  .then(registries => {
    console.log('List of registries:');
    console.dir(registries, { depth: null, colors: true });
  });

範例Samples

深入探索可在應用程式中使用的 Node.js 程式碼範例Explore more sample Node.js code you can use in your apps.