Help us shape the future of Go! Take the 2026 Go Developer Survey

docker-registry-client

module
v0.0.0-...-8f7f8ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2016 License: BSD-3-Clause

README

Fork of http://github.com/heroku/docker-registry-client/ with fewer features and dependencies

http://github.com/heroku/docker-registry-client/registry is a client for the V2 Docker Registry API. It currently depends on an old version of http://github.com/docker/distribution which makes it difficult to build.

For our project's needs, we don't actually need the parts of the upstream client that depend on Docker's library. So github.com/meteor/docker-registry-client/registry lacks the Layer and Manifest APIs of the upstream library; it only contains the Tags APIs. But it doesn't require you to vendor in an old version of http://github.com/docker/distribution using pre-core vendoring support!

Docker Registry Client

An API client for the V2 Docker Registry API, for Go applications.

Imports

import (
    "github.com/meteor/docker-registry-client/registry"
)

Creating A Client

url      := "https://registry-1.docker.io/"
username := "" // anonymous
password := "" // anonymous
hub, err := registry.New(url, username, password)

Creating a registry will also ping it to verify that it supports the registry API, which may fail. Failures return non-nil err values.

Authentication supports both HTTP Basic authentication and OAuth2 token negotiation.

Listing Tags

Each Docker repository has a set of tags -- named images that can be downloaded.

tags, err := hub.Tags("heroku/cedar")

The tags will be returned as a slice of strings.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL