Skip to content

Commit 6666beb

Browse files
committed
image-index: define platform.variant for arm
Signed-off-by: Akihiro Suda <[email protected]>
1 parent a82c098 commit 6666beb

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

image-index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
6363

6464
- **`variant`** *string*
6565

66-
This OPTIONAL property specifies the variant of the CPU, for example `armv6l` to specify a particular CPU variant of the ARM CPU.
66+
This OPTIONAL property specifies the variant of the CPU.
67+
When `architecture` is `arm`, values for arch SHOULD use, and runtimes SHOULD understand, arch entries listed in the Go Language document for [`$GOARM`](go-arm). i.e. `5`, `6`, or `7`.
68+
When `architecture` is not `arm`, values are implementation-defined and SHOULD be submitted to this specification for standardization.
6769

6870
- **`features`** *array of strings*
6971

@@ -114,3 +116,4 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
114116

115117
[runtime-platform2]: https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc3/config.md#platform
116118
[matrix]: media-types.md#compatibility-matrix
119+
[go-arm]: https://golang.org/doc/install/source#environment

schema/backwards_compatibility_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestBackwardsCompatibilityImageIndex(t *testing.T) {
4949
fail bool
5050
}{
5151
{
52-
digest: "sha256:219f4b61132fe9d09b0ec5c15517be2ca712e4744b0e0cc3be71295b35b2a467",
52+
digest: "sha256:8c4a37540ca5f211c85c8054c06a432693ff4e53f9fa64c80371a7622a9d4864",
5353
imageIndex: `{
5454
"schemaVersion": 2,
5555
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
@@ -91,7 +91,7 @@ func TestBackwardsCompatibilityImageIndex(t *testing.T) {
9191
"platform": {
9292
"architecture": "arm",
9393
"os": "linux",
94-
"variant": "armv7"
94+
"variant": "7"
9595
}
9696
},
9797
{
@@ -100,8 +100,7 @@ func TestBackwardsCompatibilityImageIndex(t *testing.T) {
100100
"digest": "sha256:fb2fc0707b86dafa9959fe3d29e66af8787aee4d9a23581714be65db4265ad8a",
101101
"platform": {
102102
"architecture": "arm64",
103-
"os": "linux",
104-
"variant": "armv8"
103+
"os": "linux"
105104
}
106105
}
107106
]

specs-go/v1/descriptor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type Platform struct {
5959
OSFeatures []string `json:"os.features,omitempty"`
6060

6161
// Variant is an optional field specifying a variant of the CPU, for
62-
// example `ppc64le` to specify a little-endian version of a PowerPC CPU.
62+
// example `7` to specify ARMv7 when architecture is `arm`.
6363
Variant string `json:"variant,omitempty"`
6464

6565
// Features is an optional field specifying an array of strings, each

0 commit comments

Comments
 (0)