Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove platform field #850

Merged
merged 1 commit into from
Jun 16, 2017
Merged
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
39 changes: 3 additions & 36 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,47 +321,19 @@ For Windows based systems the user structure has the following fields:
"hostname": "mrsdalloway"
```

## <a name="configPlatform" />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) filesystem bundle.
The runtime MUST generate an error if it does not support the specified **`os`**.
Values SHOULD be, 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) filesystem bundle have been compiled.
The runtime MUST generate an error if it does not support the specified **`arch`**.
Values SHOULD be, 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.

### Example

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

## <a name="configPlatformSpecificConfiguration" />Platform-specific configuration

[**`platform.os`**](#platform) is used to specify platform-specific 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 the target platform of this spec is `linux`.
* **`windows`** (object, OPTIONAL) [Windows-specific configuration](config-windows.md).
This MUST be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
This MUST be set if the target platform of this spec is `windows`.
* **`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 the target platform of this spec is `solaris`.

### Example (Linux)

```json
{
"platform": {
"os": "linux",
"arch": "amd64"
},
"linux": {
"namespaces": [
{
Expand Down Expand Up @@ -477,10 +449,6 @@ Here is a full example `config.json` for reference.
```json
{
"ociVersion": "0.5.0-dev",
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": true,
"user": {
Expand Down Expand Up @@ -856,7 +824,6 @@ Here is a full example `config.json` for reference.
[no-new-privs]: https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
[procfs_2]: https://www.kernel.org/doc/Documentation/filesystems/proc.txt
[semver-v2.0.0]: http://semver.org/spec/v2.0.0.html
[go-environment]: https://golang.org/doc/install/source#environment
[ieee-1003.1-2008-xbd-c8.1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_01
[ieee-1003.1-2008-xsh-exec]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
[naming-a-volume]: https://aka.ms/nb3hqb
Expand Down
19 changes: 0 additions & 19 deletions schema/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,6 @@
"$ref": "defs.json#/definitions/Mount"
}
},
"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"
}
}
},
"root": {
"description": "Configures the container's root filesystem.",
"id": "https://opencontainers.org/schema/bundle/root",
Expand Down Expand Up @@ -233,7 +215,6 @@
},
"required": [
"ociVersion",
"platform",
"root"
]
}
4 changes: 0 additions & 4 deletions schema/test/config/good/minimal-for-start.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"ociVersion": "1.0.0",
"platform": {
"os": "linux",
"arch": "amd64"
},
"root": {
"path": "rootfs"
},
Expand Down
4 changes: 0 additions & 4 deletions schema/test/config/good/minimal.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"ociVersion": "1.0.0",
"platform": {
"os": "linux",
"arch": "amd64"
},
"root": {
"path": "rootfs"
}
Expand Down
4 changes: 0 additions & 4 deletions schema/test/config/good/spec-example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"ociVersion": "0.5.0-dev",
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": true,
"user": {
Expand Down
11 changes: 0 additions & 11 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import "os"
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"`
// Process configures the container process.
Process *Process `json:"process,omitempty"`
// Root configures the container's root filesystem.
Expand Down Expand Up @@ -101,15 +99,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 absolute path where the mount will be placed in the container.
Expand Down