registry-tools: Prints image digest from a registry

registry-tools

registry-tools

Prints image digest from a registry

package main

import (
	"fmt"

	"github.com/google/go-containerregistry/pkg/authn"
	"github.com/google/go-containerregistry/pkg/name"
	"github.com/google/go-containerregistry/pkg/v1/remote"
)

func main() {
	ref, err := name.ParseReference("gcr.io/google-containers/pause")
	if err != nil {
		panic(err)
	}

	img, err := remote.Image(ref, remote.WithAuthFromKeychain(authn.DefaultKeychain))
	if err != nil {
		panic(err)
	}

	// do stuff with img
	imgid, err := img.ConfigName()
	if err != nil {
		panic(err)
	}
	fmt.Printf("image digest: %s", imgid.String())
}

Similar Resources

Solana Token Registry - a package that allows application to query for list of tokens

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed. @solana/spl-to

Jan 16, 2022

A tool to check whether docker images exist in the remote registry.

Check Docker Image A tool to check whether docker images exist in the remote registry. Build project: go build -o check-image . Example usage: REGISTR

Jul 26, 2022

Service registry/discovery implementation in Go.

go-service-registry Availabe endpoints : GET http://localhost:3000/ -- Dashboard GET http://localhost:3000/services/[serviceName] -- Get available

Feb 11, 2022

Terraform-in-Terraform: Execute Modules directly from the Terraform Registry

Terraform-In-Terraform Provider This provider allows running Terraform in Terraform. This might seem insane but there are some edge cases where it com

Dec 25, 2022

Fast docker image distribution plugin for containerd, based on CRFS/stargz

Fast docker image distribution plugin for containerd, based on CRFS/stargz

[ ⬇️ Download] [ 📔 Browse images] [ ☸ Quick Start (Kubernetes)] [ 🤓 Quick Start (nerdctl)] Stargz Snapshotter Read also introductory blog: Startup C

Dec 29, 2022

OCI Image Encryption Package

imgcrypt image encryption library and command line tool Project imgcrypt is a non-core subproject of containerd. The imgcrypt library provides API exe

Jan 5, 2023

A tool to restart a Docker container with a newer version of the image

repull A tool to restart a Docker container with a newer version of an image used by the container Often you may need to pull a newer version of an im

Nov 28, 2022

Triggers an update to a Koyeb app service to re-deploy the latest docker image

Triggers an update to a Koyeb app service to re-deploy the latest docker image

May 5, 2021

Kubernetes workload controller for container image deployment

kube-image-deployer kube-image-deployer는 Docker Registry의 Image:Tag를 감시하는 Kubernetes Controller입니다. Keel과 유사하지만 단일 태그만 감시하며 더 간결하게 동작합니다. Container, I

Mar 8, 2022
k8s-image-swapper Mirror images into your own registry and swap image references automatically.
k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically. k8s-image-swapper is a mutating webhook for Kubernetes

Dec 27, 2022
🤖 Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry
🤖 Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry

✨ Prune container images in a CLI way ✨ Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) Container Registry Getting Started | Des

Dec 15, 2022
Returns which registry from the container image name

Returns which registry from the container image name

Jan 23, 2022
Common Image Registry for Testcontainers-Go
Common Image Registry for Testcontainers-Go

Testcontainers-Go Common Image Registry Common Image Registry for Testcontainers-Go Prerequisites Go >= 1.16 Install go get github.com/nhatthm/testcon

Dec 15, 2022
Kubesecret is a command-line tool that prints secrets and configmaps data of a kubernetes cluster.

Kubesecret Kubesecret is a command-line tool that prints secrets and configmaps data of a kubernetes cluster. kubesecret -h for help pages. Install go

May 3, 2022
Command kube-tmux prints Kubernetes context and namespace to tmux status line.

kube-tmux Command kube-tmux prints Kubernetes context and namespace to tmux status line.

Sep 10, 2021
betterbattery prints the battery percentage, status, and can run a command if the percentage fell below a specified value since it was last ran.

betterbattery betterbattery prints the battery percentage, status, and can run a command if the percentage fell below a specified value since it was l

Dec 22, 2021
Kubernetes Container Registry

k8scr A kubectl plugin for pushing OCI images through the Kubernetes API server. Quickstart Build kubectl-k8scr make build Move to location in PATH s

Dec 15, 2022
Container Registry Synchronization made easy and fast

?? booster - Makes synchronization of container images between registries faster.

May 12, 2022
Kubernetes controller for backing up public container images to our own registry repository

image-clone-controller Kubernetes controller which watches applications (Deployment and DaemonSet) and "caches" the images (public container images) b

Aug 28, 2022