Skip to content

Commit 8cd3190

Browse files
authored
Merge pull request #650 from AkihiroSuda/platform-variant
image-index: define platform.variant for arm
2 parents f03dbe3 + 4d4320f commit 8cd3190

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

image-index.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,16 @@ 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+
Image indexes SHOULD use, and implementations SHOULD understand, values listed in the following table.
68+
When the variant of the CPU is not listed in the table, values are implementation-defined and SHOULD be submitted to this specification for standardization.
69+
70+
| ISA/ABI | `architecture` | `variant` |
71+
|-----------------|----------------|-------------|
72+
| ARM 32-bit, v6 | `arm` | `v6` |
73+
| ARM 32-bit, v7 | `arm` | `v7` |
74+
| ARM 32-bit, v8 | `arm` | `v8` |
75+
| ARM 64-bit, v8 | `arm64` | `v8` |
6776

6877
- **`features`** *array of strings*
6978

schema/backwards_compatibility_test.go

Lines changed: 3 additions & 3 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:d0ed7cfe33821cb6a15624486e650149e92fff3192ff2014bda0c4b0206c1aa2",
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": "v7"
9595
}
9696
},
9797
{
@@ -101,7 +101,7 @@ func TestBackwardsCompatibilityImageIndex(t *testing.T) {
101101
"platform": {
102102
"architecture": "arm64",
103103
"os": "linux",
104-
"variant": "armv8"
104+
"variant": "v8"
105105
}
106106
}
107107
]

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 `v7` 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)