diff --git a/config.md b/config.md
index aedcf142f..95ec3c977 100644
--- a/config.md
+++ b/config.md
@@ -304,46 +304,32 @@ For Windows based systems the user structure has the following fields:
## Platform
-**`platform`** (object, REQUIRED) specifies the configuration's target platform.
-
-* **`os`** (string, REQUIRED) specifies the operating system family of the container configuration's specified [`root`](#root) file system bundle.
- The runtime MUST generate an error if it does not support the specified **`os`**.
- Bundles SHOULD use, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`GOOS`][go-environment].
- If an operating system is not included in the `GOOS` documentation, it SHOULD be submitted to this specification for standardization.
-* **`arch`** (string, REQUIRED) specifies the instruction set for which the binaries in the specified [`root`](#root) file system bundle have been compiled.
- 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.
+**`platform`** (string, REQUIRED) specifies the configuration's target platform.
+ The value MUST be a slug from [the platform list](spec.md#platforms).
### Example
```json
-"platform": {
- "os": "linux",
- "arch": "amd64"
-}
+"platform": "linux"
```
## Platform-specific configuration
-[**`platform.os`**](#platform) is used to specify platform-specific configuration.
+[**`platform`**](#platform) is used to specify platform-specific configuration.
Runtime implementations MAY support any valid values for platform-specific fields as part of this configuration.
* **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md).
- This MAY be set if **`platform.os`** is `linux` and MUST NOT be set otherwise.
+ This MAY be set if **`platform`** is `linux` and MUST NOT be set otherwise.
* **`windows`** (object, OPTIONAL) [Windows-specific configuration](config-windows.md).
- This MAY be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
+ This MAY be set if **`platform`** is `windows` and MUST NOT be set otherwise.
* **`solaris`** (object, OPTIONAL) [Solaris-specific configuration](config-solaris.md).
- This MAY be set if **`platform.os`** is `solaris` and MUST NOT be set otherwise.
+ This MAY be set if **`platform`** is `solaris` and MUST NOT be set otherwise.
### Example (Linux)
```json
{
- "platform": {
- "os": "linux",
- "arch": "amd64"
- },
+ "platform": "linux",
"linux": {
"namespaces": [
{
@@ -459,10 +445,7 @@ Here is a full example `config.json` for reference.
```json
{
"ociVersion": "0.5.0-dev",
- "platform": {
- "os": "linux",
- "arch": "amd64"
- },
+ "platform": "linux",
"process": {
"terminal": true,
"user": {
diff --git a/schema/config-schema.json b/schema/config-schema.json
index e37918b71..98012a956 100644
--- a/schema/config-schema.json
+++ b/schema/config-schema.json
@@ -39,21 +39,7 @@
},
"platform": {
"id": "https://opencontainers.org/schema/bundle/platform",
- "type": "object",
- "required": [
- "arch",
- "os"
- ],
- "properties": {
- "arch": {
- "id": "https://opencontainers.org/schema/bundle/platform/arch",
- "type": "string"
- },
- "os": {
- "id": "https://opencontainers.org/schema/bundle/platform/os",
- "type": "string"
- }
- }
+ "type": "string",
},
"root": {
"description": "Configures the container's root filesystem.",
diff --git a/schema/test/config/good/minimal-for-start.json b/schema/test/config/good/minimal-for-start.json
index 09379d1e9..761251ce3 100644
--- a/schema/test/config/good/minimal-for-start.json
+++ b/schema/test/config/good/minimal-for-start.json
@@ -1,9 +1,6 @@
{
"ociVersion": "1.0.0",
- "platform": {
- "os": "linux",
- "arch": "amd64"
- },
+ "platform": "linux",
"root": {
"path": "rootfs"
},
diff --git a/schema/test/config/good/minimal.json b/schema/test/config/good/minimal.json
index b1f4f2f33..0c5aec0a6 100644
--- a/schema/test/config/good/minimal.json
+++ b/schema/test/config/good/minimal.json
@@ -1,9 +1,6 @@
{
"ociVersion": "1.0.0",
- "platform": {
- "os": "linux",
- "arch": "amd64"
- },
+ "platform": "linux",
"root": {
"path": "rootfs"
}
diff --git a/schema/test/config/good/spec-example.json b/schema/test/config/good/spec-example.json
index 309183c6f..996e1d738 100644
--- a/schema/test/config/good/spec-example.json
+++ b/schema/test/config/good/spec-example.json
@@ -1,9 +1,6 @@
{
"ociVersion": "0.5.0-dev",
- "platform": {
- "os": "linux",
- "arch": "amd64"
- },
+ "platform": "linux",
"process": {
"terminal": true,
"user": {
diff --git a/specs-go/config.go b/specs-go/config.go
index b67c6b8f7..ab5e435e1 100644
--- a/specs-go/config.go
+++ b/specs-go/config.go
@@ -7,7 +7,7 @@ type Spec struct {
// Version of the Open Container Runtime Specification with which the bundle complies.
Version string `json:"ociVersion"`
// Platform specifies the configuration's target platform.
- Platform Platform `json:"platform"`
+ Platform string `json:"platform"`
// Process configures the container process.
Process *Process `json:"process,omitempty"`
// Root configures the container's root filesystem.
@@ -101,15 +101,6 @@ type Root struct {
Readonly bool `json:"readonly,omitempty"`
}
-// Platform specifies OS and arch information for the host system that the container
-// is created for.
-type Platform struct {
- // OS is the operating system.
- OS string `json:"os"`
- // Arch is the architecture
- Arch string `json:"arch"`
-}
-
// Mount specifies a mount for a container.
type Mount struct {
// Destination is the path where the mount will be placed relative to the container's root. The path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point.