Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,18 @@ For Windows based systems the user structure has the following fields:
The runtime MUST generate an error if it does not support the specified **`arch`**.
Values for **`arch`** SHOULD use, and runtimes SHOULD understand, **`arch`** entries listed in the Go Language document for [`GOARCH`][go-environment].
If an architecture is not included in the `GOARCH` documentation, it SHOULD be submitted to this specification for standardization.
* **`os.version`** (string, OPTIONAL) specifies the operating system version, for example `10.0.10586`.
* **`os.features`** (array of strings, OPTIONAL) specifies an array of strings, each specifying a mandatory OS feature, for example `win32k`.
* **`variant`** (string, OPTIONAL) specifies the variant of the CPU, for example `v8` to specify a perticular CPU variant of the ARM CPU.
* **`features`** (array of strings, OPTIONAL) this property is RESERVED for future versions of the specification.

### Example

```json
"platform": {
"os": "linux",
"arch": "amd64"
"arch": "amd64",
"variant": "v8"
}
```

Expand All @@ -338,7 +343,8 @@ Runtime implementations MAY support any valid values for platform-specific field
{
"platform": {
"os": "linux",
"arch": "amd64"
"arch": "amd64",
"variant": "v8"
},
"linux": {
"namespaces": [
Expand Down
17 changes: 16 additions & 1 deletion schema/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,22 @@
"os": {
"id": "https://opencontainers.org/schema/bundle/platform/os",
"type": "string"
}
},
"os.version": {
"id": "https://opencontainers.org/schema/bundle/platform/os.version",
"type": "string"
},
"os.features": {
"id": "https://opencontainers.org/schema/bundle/platform/os.features",
"type": "array",
"items": {
"type": "string"
}
},
"variant": {
"id": "https://opencontainers.org/schema/bundle/platform/variant",
"type": "string"
}
}
},
"root": {
Expand Down
8 changes: 8 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ type Platform struct {
OS string `json:"os"`
// Arch is the architecture
Arch string `json:"arch"`
// OSVersion specifies the operating system version, for example `10.0.10586`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd pick a more up to date build. And it's actually a quad-tuple these days (it was a triplet). eg 10.0.14393.1198 is the current fully-patched Windows Server 2016 RS1 build number.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Historical - 10586 was a pre-release, IIRC Technical Preview 4 of Windows Server 2016)

Copy link
Contributor

@wking wking May 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd pick a more up to date build.

My take on the discussion is that runtime-spec will likely drop platform or keep only platform.os. Either way, this line is unlikely to land in runtime-spec, so we probably don't need to worry about it.

And the image-spec analog got a quad-tuple in the recently-landed opencontainers/image-spec#651.

OSVersion string `json:"os.version,omitempry"`
// OSFeatures specifies an array of strings, each specifying a mandatory
// OS feature, for example `win32k`.
OSFeatures []string `json:"os.features,omitempry"`
// Variant specifies the variant of the CPU, for example `v8` to specify
// a perticular CPU variant of the ARM CPU.
Variant string `json:"variant,omitempry"`
}

// Mount specifies a mount for a container.
Expand Down