Skip to content

Commit 63b7c6c

Browse files
Merge pull request #850 from hqhq/simply_platform
Remove platform field
2 parents b5017e2 + af0e225 commit 63b7c6c

File tree

6 files changed

+3
-78
lines changed

6 files changed

+3
-78
lines changed

config.md

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -321,47 +321,19 @@ For Windows based systems the user structure has the following fields:
321321
"hostname": "mrsdalloway"
322322
```
323323

324-
## <a name="configPlatform" />Platform
325-
326-
**`platform`** (object, REQUIRED) specifies the configuration's target platform.
327-
328-
* **`os`** (string, REQUIRED) specifies the operating system family of the container configuration's specified [`root`](#root) filesystem bundle.
329-
The runtime MUST generate an error if it does not support the specified **`os`**.
330-
Values SHOULD be, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`GOOS`][go-environment].
331-
If an operating system is not included in the `GOOS` documentation, it SHOULD be submitted to this specification for standardization.
332-
* **`arch`** (string, REQUIRED) specifies the instruction set for which the binaries in the specified [`root`](#root) filesystem bundle have been compiled.
333-
The runtime MUST generate an error if it does not support the specified **`arch`**.
334-
Values SHOULD be, and runtimes SHOULD understand, **`arch`** entries listed in the Go Language document for [`GOARCH`][go-environment].
335-
If an architecture is not included in the `GOARCH` documentation, it SHOULD be submitted to this specification for standardization.
336-
337-
### Example
338-
339-
```json
340-
"platform": {
341-
"os": "linux",
342-
"arch": "amd64"
343-
}
344-
```
345-
346324
## <a name="configPlatformSpecificConfiguration" />Platform-specific configuration
347325

348-
[**`platform.os`**](#platform) is used to specify platform-specific configuration.
349-
350326
* **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md).
351-
This MAY be set if **`platform.os`** is `linux` and MUST NOT be set otherwise.
327+
This MAY be set if the target platform of this spec is `linux`.
352328
* **`windows`** (object, OPTIONAL) [Windows-specific configuration](config-windows.md).
353-
This MUST be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
329+
This MUST be set if the target platform of this spec is `windows`.
354330
* **`solaris`** (object, OPTIONAL) [Solaris-specific configuration](config-solaris.md).
355-
This MAY be set if **`platform.os`** is `solaris` and MUST NOT be set otherwise.
331+
This MAY be set if the target platform of this spec is `solaris`.
356332

357333
### Example (Linux)
358334

359335
```json
360336
{
361-
"platform": {
362-
"os": "linux",
363-
"arch": "amd64"
364-
},
365337
"linux": {
366338
"namespaces": [
367339
{
@@ -477,10 +449,6 @@ Here is a full example `config.json` for reference.
477449
```json
478450
{
479451
"ociVersion": "0.5.0-dev",
480-
"platform": {
481-
"os": "linux",
482-
"arch": "amd64"
483-
},
484452
"process": {
485453
"terminal": true,
486454
"user": {
@@ -856,7 +824,6 @@ Here is a full example `config.json` for reference.
856824
[no-new-privs]: https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
857825
[procfs_2]: https://www.kernel.org/doc/Documentation/filesystems/proc.txt
858826
[semver-v2.0.0]: http://semver.org/spec/v2.0.0.html
859-
[go-environment]: https://golang.org/doc/install/source#environment
860827
[ieee-1003.1-2008-xbd-c8.1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_01
861828
[ieee-1003.1-2008-xsh-exec]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
862829
[naming-a-volume]: https://aka.ms/nb3hqb

schema/config-schema.json

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,6 @@
3737
"$ref": "defs.json#/definitions/Mount"
3838
}
3939
},
40-
"platform": {
41-
"id": "https://opencontainers.org/schema/bundle/platform",
42-
"type": "object",
43-
"required": [
44-
"arch",
45-
"os"
46-
],
47-
"properties": {
48-
"arch": {
49-
"id": "https://opencontainers.org/schema/bundle/platform/arch",
50-
"type": "string"
51-
},
52-
"os": {
53-
"id": "https://opencontainers.org/schema/bundle/platform/os",
54-
"type": "string"
55-
}
56-
}
57-
},
5840
"root": {
5941
"description": "Configures the container's root filesystem.",
6042
"id": "https://opencontainers.org/schema/bundle/root",
@@ -233,7 +215,6 @@
233215
},
234216
"required": [
235217
"ociVersion",
236-
"platform",
237218
"root"
238219
]
239220
}

schema/test/config/good/minimal-for-start.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"ociVersion": "1.0.0",
3-
"platform": {
4-
"os": "linux",
5-
"arch": "amd64"
6-
},
73
"root": {
84
"path": "rootfs"
95
},

schema/test/config/good/minimal.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"ociVersion": "1.0.0",
3-
"platform": {
4-
"os": "linux",
5-
"arch": "amd64"
6-
},
73
"root": {
84
"path": "rootfs"
95
}

schema/test/config/good/spec-example.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"ociVersion": "0.5.0-dev",
3-
"platform": {
4-
"os": "linux",
5-
"arch": "amd64"
6-
},
73
"process": {
84
"terminal": true,
95
"user": {

specs-go/config.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import "os"
66
type Spec struct {
77
// Version of the Open Container Runtime Specification with which the bundle complies.
88
Version string `json:"ociVersion"`
9-
// Platform specifies the configuration's target platform.
10-
Platform Platform `json:"platform"`
119
// Process configures the container process.
1210
Process *Process `json:"process,omitempty"`
1311
// Root configures the container's root filesystem.
@@ -101,15 +99,6 @@ type Root struct {
10199
Readonly bool `json:"readonly,omitempty"`
102100
}
103101

104-
// Platform specifies OS and arch information for the host system that the container
105-
// is created for.
106-
type Platform struct {
107-
// OS is the operating system.
108-
OS string `json:"os"`
109-
// Arch is the architecture
110-
Arch string `json:"arch"`
111-
}
112-
113102
// Mount specifies a mount for a container.
114103
type Mount struct {
115104
// Destination is the absolute path where the mount will be placed in the container.

0 commit comments

Comments
 (0)