Skip to content

Commit 4e11c95

Browse files
committed
manifest: Require unpackers to create a config.json from the referenced config
The image-tools framework has attempted this since d3ffc1c (oci-image-tool: implement create-runtime-bundle, 2016-06-02, #114), but we didn't specify whether the translation was required or what the output of the translation should be. That means downstream consumers of an unpacked image couldn't be sure if they'd find a config.json or (if they found one) which runtime-spec versions it would be compatible with. With this commit, the config output becomes specified, so consumers can post-process their config.json and/or invoke a runtime-spec 1.0.0-rc2-compatible runtime on it without worrying about the presence or version of the unpacked config.json. I've picked 1.0.0-rc2 as the most recent runtime-spec commit. As the runtime-spec moves forward with more RCs, I expect we'll want to bump this to keep up. Once runtime-spec hits 1.0, we can probably freeze the target, since post 1.0 releases in runtime-spec's 1.x line are unlikely to make translation from the config format easier, and any 1.x-compatible runtime will be able to handle 1.0 configs. Signed-off-by: W. Trevor King <[email protected]>
1 parent 7cab1f8 commit 4e11c95

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ An OCI *Image* is an ordered collection of root filesystem changes and the corre
44
This specification outlines the JSON format describing images for use with a container runtime and execution tool and its relationship to filesystem changesets, described in [Layers](layer.md).
55

66
This section defines the `application/vnd.oci.image.config.v1+json` [media type](media-types.md).
7+
Implementations unpacking this type MUST generate a [version 1.0.0-rc2 runtime-spec configuration][runtime-config].
78

89
## Terminology
910

@@ -232,4 +233,5 @@ Here is an example image configuration JSON document:
232233
}
233234
```
234235

236+
[runtime-config]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md
235237
[runtime-platform]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md#platform

manifest.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Unlike the [Manifest List](manifest-list.md), which contains information about a
2828
- **`config`** *[descriptor](descriptor.md)*
2929

3030
This REQUIRED property references a configuration object for a container, by digest.
31+
Implementations unpacking manifests MUST generate a [`config.json`][bundle-format] from the referenced configuration.
3132
Beyond the [descriptor requirements](descriptor.md#properties), the value has the following additional restrictions:
3233

3334
- **`mediaType`** *string*
@@ -118,3 +119,5 @@ This specification defines the following annotation keys, which MAY be used by m
118119
* **org.opencontainers.authors** contact details of the people or organization responsible for the image (freeform string)
119120
* **org.opencontainers.homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
120121
* **org.opencontainers.documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)
122+
123+
[bundle-format]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md#container-format

0 commit comments

Comments
 (0)