go-containerregistry | Go library and CLIs for working with container registries | Continuous Deployment library
kandi X-RAY | go-containerregistry Summary
kandi X-RAY | go-containerregistry Summary
The simplest use for these libraries is to read from one source and write to another. However, often you actually want to change something about an image. This is the purpose of the mutate package, which exposes some commonly useful things to change about an image. If you're trying to use this library with a different source or sink than it already supports, it can be somewhat cumbersome. The Image and Layer interfaces are pretty wide, with a lot of redundant information. This is somewhat by design, because we want to expose this information as efficiently as possible where we can, but again it is a pain to implement yourself. The purpose of the partial package is to make implementing a v1.Image much easier, by filling in all the derived accessors for you if you implement a minimal subset of v1.Image. You might think our abstractions are bad and you just want to authenticate and send requests to a registry. This is the purpose of the transport and authn packages.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-containerregistry
go-containerregistry Key Features
go-containerregistry Examples and Code Snippets
Community Discussions
Trending Discussions on go-containerregistry
QUESTION
I'm wondering how I can check that a docker image exists in a private registry (in eu.gcr.io
), without pulling it.
I have a service, written in golang, which needs to check for the existence of a docker image in order to validate a config file passed to it by a user.
Pulling the image using the go docker client, as shown here, works. However, I don't want to pull down images just to check they exist, as they can be large.
I've tried using Client.ImageSearch, but his just searches for public images. the cloud.google.com/go package also doesn't seem to have anything for dealing with the container registry.
There's possibly this and the crane tool it contains, but I'm really struggling to figure out how it works. The documentation is... not great.
I'd like the solution to be host agnostic, and the only option I have found is to simply make a http request and use the logic from this answer.
Are there any docker or other packages able to do this in a cleaner way?
...ANSWER
Answered 2019-Mar-19 at 14:22Just realised the lib I've been using has an unhelpfully named client method DistributionInspect
(link), which will just return the image digest and manifest, if it's found. so the image doesn't get pulled down.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install go-containerregistry
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page