-
Notifications
You must be signed in to change notification settings - Fork 54
docs: proposal for CNAB Architecture #23
Comments
AbstractThe Container-Native Application Bundle is a container that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. A CNAB is used as the first root container that your machine runs, similar to how the kernel first boots an initramfs to mount filesystems in user space. It is used for bootstrapping containers which has your application's runtime, system tools, libraries and settings, along with any other extra configuration required to run your application. The CNAB carries the modules needed for booting your containers. The idea is to have a "user space" container to configure and boot the bundle appropriately. the bundle plays as a mediator between your application containers, any configuration for external tooling and the execution runtime, giving users a temporary container which bears the user space utilities needed for running your entire application. Proposal SummaryContainer-Native Application Bundles are self-describing manifests containing a list of containers, content-addressable layers for the "init" container, run configuration, and signatures to identify and verify the bundle meets the expectations of the installer. CNAB ManifestThe CNAB manifest file will contain all the information which is needed to pull, install, validate and run a bundle. It will contain a list of images for the initcontainer and dependent containers using a content addressable ID, and signatures. This manifest is generated by The payload of the manifest file is a JSON dictionary containing the digest of the initcontainer and image digests of the dependent containers. The entire payload will be signed, and any changes including whitespace will require a new signature. The signable manifest should be well-formatted JSON. The signature could be represented as either a JSON Web Signature, in which the payload is the base64 encoded payload. This ensures the format is fully verifiable and tamper-proof. http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-7.2 For the POC, the manifest can be generated by the Example:
In this example, the signature would be generated using the In other words, the base64 value of the above example would be
Which is then translated to base64:
We'd then use this base64-encoded section of the manifest to generate a signature. Content Addressable Images/LayersEach digest in the bundle will be referenced by a checksum created from its contents. This checksum will be used on push and pull to verify contents have not been tampered and disallow the layer referred to in the manifest to be changed after it has been signed. Manage manifest by tag
List tags
Download an image layer by content id
Upload a bundle
Upload an image layer
CompatibilityFor compatibility with existing versions of docker registries, the manifests referenced in the bundle will address the existing Image v2 API. This compatibility will allow CNAB to re-use existing Docker containers available in their current format and layout. |
I'm currently moving over the part of the slide show that specifies this, then I will take a closer look at this. |
We've started to implement this and go a different route than by uploading the manifest to a docker registry. Closing! |
We should determine the basic underlying architecture/layout of a CNAB manifest and document it. The architecture should be able to handle all the existing example use cases:
#11
#12
#13
#14
#15
#16
#21
relatedly, it should also present a proposal for how a CNAB manifest is addressed in storage via #5 and #6.
The text was updated successfully, but these errors were encountered: