-
Notifications
You must be signed in to change notification settings - Fork 774
Description
Hi all,
The purpose is to talk about improving the agile way of publishing image with cooperation between different departments.
For example, when some image, with many layer parts like applications, jvm, os, want to be published. Following current rules, it needs to generate and publish series of image, as:
-
OS (base image)
-
JVM (from OS)
-
APP (from JVM, from OS)
This is from some consumer requirement. I think image-spec might add some new definition to support this kind of requirement, and bring about some benefits (as described below).
Publishing image might be separated by 2 steps:
-
Upload only JVM and APP as layered-image (means can’t generate rootfs). They need be combined with OS, to generate rootfs and run successfully. The images, in repository, looks like normal image, have also name and reference.
-
Upload combinational image manifest, in which involving above manifest list and their dependency, like below:
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.list.v1+json",
"config": {
"mediaType": "application/vnd.oci.combinational.image.config.v1+json",
"size": 7023,
"digest": "alg:hash"
},
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7143,
"digest": "alg:hash"
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7682,
"digest": "alg:hash"
}
],
}This is a metadata of whole image. We define a name and reference for it, and publish it on repository. Then consumer can pull it with all layered-image.
I think this way has some benefit:
-
Make different branch focus on, and publish only their partly development, needn’t frequently care other branch change (to a certain extent).
-
Makes publish and distribution more freely. The final publish job may be taken by application department, or specific department.
-
Sometimes departments want to publish their partly image on different Hubs. If we defined the layered-images URL (hashed) in combinational manifest, we will be able to get the whole image from different hubs.
-
For image manifest is hashed in combinational manifest, it will not be changed with any layered-image, unless it is re-published.
Here I’d like to discuss with folks about if it make sense.