Comments (9)
I think we want two constructs:
scratch.Image
: the empty image, maybe even a singleton likeauthn.Anonymous
(tho in hindsight, we don't getAnonymous
in the godoc, so this is likely choice we should walk back before it's too late).append.Image
: take a base, and what to augment it with.
WDYT?
from go-containerregistry.
We need more than just append, although I guess a "SetLayers" call could be constructed out of a series of appends...
If we also had something to set the Config, I think that would be enough.
Then modifying the Config from an existing Image would look like:
Create a scratch.Image, set the Config on that.
Append in each layer from the existing Image
from go-containerregistry.
authn.Anonymous
is in the godoc: https://godoc.org/github.com/google/go-containerregistry/authn -- it's just very well hidden. I'd rather file a godoc bug than modify the API to suit godoc's current behavior.
from go-containerregistry.
I retract my previous statement (I see it now), singletons are fine. :)
from go-containerregistry.
@dlorenc Why not just take a slice of layers to append? :)
from go-containerregistry.
Yeah that works, we just need a way to also set Config independently. I'm not a big fan of the way it happens in Python, with overrides being tacked onto the append.
from go-containerregistry.
What was the rationale for making v1.Image
an interface instead of a struct with exported fields? That would let you modify the value returned by remote.Image(...)
directly, without needing some kind of append.Image(remoteImage, newLayers...)
method.
from go-containerregistry.
That necessitates eager fetching, there is signficant performance advantage to laziness.
e.g. This code should be able to copy an image between two repositories on the same registry (via mounting) without ever hitting the blob
endpoint.
from go-containerregistry.
What if fields from blobs were only populated after calling some method? How large are config blobs expected to get?
from go-containerregistry.
Related Issues (20)
- question: Would you consider this enhancement? HOT 3
- question: How manually configure the go-containerregistry client to use HTTP when accessing a registry HOT 2
- crane: GCR images are not up to date HOT 1
- ggcr: "func (w wrapper) Resolve" ignores errors
- question: support for v1layout tarball?
- crane: MacOS Signed binaries
- question: append with an empty base and environment vars? HOT 3
- question: does this library ensures the integrity of an image downloaded by its digest ?
- crane: fails to load URL-sourced environment credentials
- crane: Enhancements suggest in crane push
- ggcr: `mutate.Extract` does not handle whiteouts of directories properly
- The auth logout command empties all authorized entries HOT 1
- question: Consider distributing crane on conda-forge
- ggcr: creating an empty image index that contains empty image manifest not supported
- crane: cannot push or validate .tar.gz format HOT 3
- crane: Cannot Append Windows Layer Without Duplicate "Files"
- gcrane: unable to transfer images from google container registry to google artifact registry HOT 1
- Getting panic while doing uncompressed HOT 1
- question: How to mutate an image's platform HOT 2
- ggcr: WriteImage race condition on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-containerregistry.