Labels & Annotations: Expected behaviour #1
Replies: 4 comments 11 replies
-
I think labels and annotations are a bit of a wild west, and specifying one in a Dockerfile should (as it does) show up in the config, but I don't think that necessarily means we want it in the manifest. The Dockerfile |
Beta Was this translation helpful? Give feedback.
-
I think having two different things with near-synonym names is bad. Either they should be the same — and with the same name, i.e. drop “annotation” — or the names should be more descriptive (e.g. ”container label” and “manifest label”). |
Beta Was this translation helpful? Give feedback.
-
It may depend on whether one wants to be able to add the annotations after an image is already built without changing the hash. |
Beta Was this translation helpful? Give feedback.
-
Thanks so far; I'd summarize the discussion like that (I also updated the discussion above): 24h LaterKey points:
We'll discuss this on Thursday, but that shaped the discussion in the direction of:
|
Beta Was this translation helpful? Give feedback.
-
Hey y'all,
while working on the HPC Container Conformance project I stumbled upon a problem, I'd like to get feedback from the community on: It's about labels and annotations and what folks expect.
Labels/Annotations
Not sure how aware folks are but labels and annotations are not synonyms.
UPDATE: They are not static as they are able to be changed when a container is instantiated (
docker run --label=foo=bar
) 🔥If you build a Dockerfile with a bunch of
LABEL
s in it - it won't end up in manifest annotations. I would expect that folks are not aware of that and that they are using labels and annotations as synonyms.24h Later
Key points:
LABEL foo=bar
in a Dockerfile and that's fineapplication/vnd.oci.image.manifest.v1+json
) SHOULD (not MUST) have a reverse DNS key.a. runtimes/build tools might create and consume LABELs (historically and for compatibility reasons)
b. registries are looking out for annotations (partly maybe because they expect them to be for public use)
We'll discuss this on Thursday, but that shaped the discussion in the direction of:
image.manifest
oci.image.index.v1
(aka manifest list in docker terms) does not necessarily carry over the annotations of all the manifests. We need to define what the index annotations convey once we figured out theimage.manifest
once. :)2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions