Pass container labels as annotations in OCI spec#39142
Pass container labels as annotations in OCI spec#39142avagin wants to merge 1 commit intomoby:masterfrom
Conversation
Signed-off-by: Andrei Vagin <avagin@google.com>
|
The reason this is not done is because at some point it was decided that labels are for higher-level tools (that is Docker API clients) and not for passing down configuration. This of course all happened before OCI and annotations, etc. Does it make sense to pass down all labels? Can this cause some unexpected behaviors? |
|
I think in previous discussions I was also wondering if Docker labels should be namespaced / prefixed to distinguish them from labels set at lower levels (e.g. |
|
Implemented (but slightly different) in #45025 |
Docker container labels and OCI container annotations have the same meaning.
Annotations can be used by container runtime tools. For example, runc handles the org.criu.config annotation. Overall, it is a good way (only one?) to pass custom options to container runtime tools.
Links:
https://github.com/opencontainers/image-spec/blob/master/annotations.md
https://github.com/opencontainers/runc/blob/master/docs/checkpoint-restore.md