Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

docker-registry-api

0.0.0 • Public • Published

docker-registry-api

a javascript native promise based node wrapper for working with a local instance of the docker registry api

Install

npm install docker-registry-api --save

Init

var dockerRegistry = require('docker-registry-api');
 
var options = {
    user: "",
    password: "",
    baseURL: ""
};
 
dockerRegistry(options);

Options

  • user: The User to sign into the registry with
  • password: The Password to sign into the registry with
  • baseURL: The URL for the registry. eg: hub.docker.com
  • port: The Port Number to connect to. Default: 5000
  • timeout: Timeout value in milliseconds. Default 15000
  • verbose: Log console actions taken (for debugging). Default false

each option has a get and set method in camel case (dockerRegistry(options).setVerbose(true)).

Usage

List of Repositories

dockerRegistry(options).repositories().then(function(repositories) {
    console.log(repositories);
}).catch(function(error) {
    console.error(error);
});

List of Tags for a Repository

var repository = "hello-world";
dockerRegistry(options).tags(repository).then(function(tags) {
    console.log(tags);
}).catch(function(error) {
    console.error(error);
});

Manifests Details for a Repository

var repository = "hello-world";
var tag = "latest";
dockerRegistry(options).manifests(repository, tag).then(function(manifest) {
    console.log(manifest);
}).catch(function(error) {
    console.error(error);
});

install

npm i docker-registry-api

Downloadsweekly downloads

2

version

0.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability