Skip to content

Commit 826f7ee

Browse files
committed
config|manifest-list: Punt to runtime-spec for platform OS/arch
The new wording makes it clear that implementations are free to support only a subset of OSes or architectures, and both implementations and blobs are free to support/use OSes and architectures not listed in runtime-spec. Leaning on runtime-spec here lets us consolidate any OCI GOOS/GOARCH extension in a single location (runtime-spec). I think it is unfortunate that the manifest-list and config types have inconsistent platform formats. It would be nice to give config the same 'platform' nesting as manifest-list, and to have both locations support os.version and the other settings which are currently only in manifest-list (or to drop those settings). But I'll leave fixing that for later work ;). Signed-off-by: W. Trevor King <[email protected]>
1 parent d9167b2 commit 826f7ee

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

config.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,12 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a
6060
- **architecture** *string*, REQUIRED
6161

6262
The CPU architecture which the binaries in this image are built to run on.
63-
Possible values include: `386`, `amd64`, `arm`, `arm64`.
64-
More values may be supported in the future and any of these may or may not be supported by a given container runtime implementation.
65-
New entries SHOULD be submitted to this specification for standardization and be inspired by the [Go language documentation for $GOOS and $GOARCH](https://golang.org/doc/install/source#environment).
63+
Configurations SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.arch`][runtime-platform].
6664

6765
- **os** *string*, REQUIRED
6866

6967
The name of the operating system which the image is built to run on.
70-
Possible values include: `darwin`, `freebsd`, `linux`.
71-
More values may be supported in the future and any of these may or may not be supported by a given container runtime implementation.
72-
New entries SHOULD be submitted to this specification for standardization and be inspired by the [Go language documentation for $GOOS and $GOARCH](https://golang.org/doc/install/source#environment).
68+
Configurations SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.os`][runtime-platform].
7369

7470
- **config** *object*, OPTIONAL
7571

@@ -235,3 +231,5 @@ Here is an example image configuration JSON document:
235231
]
236232
}
237233
```
234+
235+
[runtime-platform]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md#platform

manifest-list.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ This section defines the `application/vnd.oci.image.manifest.list.v1+json` [medi
3838
- **`platform`** *object*
3939

4040
This REQUIRED property describes the platform which the image in the manifest runs on.
41-
A full list of valid operating system and architecture values are listed in the [Go language documentation for `$GOOS` and `$GOARCH`](https://golang.org/doc/install/source#environment)
4241

4342
- **`architecture`** *string*
4443

45-
This REQUIRED property specified the CPU architecture, for example `amd64` or `ppc64le`.
44+
This REQUIRED property specified the CPU architecture.
45+
Manifest lists SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.arch`][runtime-platform].
4646

4747
- **`os`** *string*
4848

49-
This REQUIRED property specifies the operating system, for example `linux` or `windows`.
49+
This REQUIRED property specifies the operating system.
50+
Manifest lists SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.os`][runtime-platform].
5051

5152
- **`os.version`** *string*
5253

@@ -117,3 +118,5 @@ Instead they MUST ignore unknown properties.
117118
}
118119
}
119120
```
121+
122+
[runtime-platform]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md#platform

0 commit comments

Comments
 (0)