Skip to content

imagespy/registry-client

Repository files navigation

registry-client

Build Status GoDoc

A Docker Registry client.

Usage

package main

import (
	"fmt"
	"log"

	"github.com/imagespy/registry-client"
)

func main() {
	reg := &registry.Registry{
		Authenticator: registry.NewTokenAuthenticator(),
		Client:        registry.DefaultClient(),
		Domain:        "docker.io",
	}

	repo, err := reg.RepositoryFromString("golang")
	if err != nil {
		log.Fatal(err)
	}

	img, err := repo.Images().GetByTag("1.12.0")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(img.Digest)
}

Releases

No releases published

Packages

No packages published

Languages