From b4a3c8daebe6671f5600eb072851248f425a58cc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 15 Sep 2016 08:55:00 -0700 Subject: [PATCH 1/2] spec: Slug protocol names We'll be referring to these in code, and using a slug everywhere avoids having to define both a slug form (linux) and an English form (Linux containers). Signed-off-by: W. Trevor King --- spec.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec.md b/spec.md index 750a9b133..2d7d034b8 100644 --- a/spec.md +++ b/spec.md @@ -3,9 +3,10 @@ The [Open Container Initiative](http://www.opencontainers.org/) develops specifications for standards on Operating System process and application containers. Protocols defined by this specification are: -* Linux containers: [runtime.md](runtime.md), [config.md](config.md), [config-linux.md](config-linux.md), and [runtime-linux.md](runtime-linux.md). -* Solaris containers: [runtime.md](runtime.md), [config.md](config.md), and [config-solaris.md](config-solaris.md). -* Windows containers: [runtime.md](runtime.md), [config.md](config.md), and [config-windows.md](config-windows.md). + +* `linux`: [runtime.md](runtime.md), [config.md](config.md), [config-linux.md](config-linux.md), and [runtime-linux.md](runtime-linux.md). +* `solaris`: [runtime.md](runtime.md), [config.md](config.md), and [config-solaris.md](config-solaris.md). +* `windows`: [runtime.md](runtime.md), [config.md](config.md), and [config-windows.md](config-windows.md). # Table of Contents From 4af0c72f92aacf1b43618d7986197d8209fadf0b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 15 Sep 2016 08:26:13 -0700 Subject: [PATCH 2/2] config: Link platform:"..." JSON tags with platform slugs So that the semantics of the tags are clear. The platform/protocol disconnect is unfortunate. "Protocol" was chosen in de3f1af6 (Remove language around Solaris being optional as it is covered in compliance language, 2016-08-17, #527) because we may have compliance subsets that aren't linked to platforms [1]. I'd be open to renaming the JSON tag from platform:"..." -> protocol:"...", but that's probably more change than it's worth. The approach taken in this commit, on the other hand, renames "protocol" to "platform". I think that unnecessarily limits (or sets up confusing semantics for) the platform/protocol values you can use, but two maintainers both prefer "platform" [2,3]. [1]: https://github.com/opencontainers/runtime-spec/pull/527#issuecomment-238979250 [2]: https://github.com/opencontainers/runtime-spec/pull/570#discussion_r99227202 [3]: https://github.com/opencontainers/runtime-spec/pull/570#discussion_r100013014 Signed-off-by: W. Trevor King --- config.md | 3 ++- spec.md | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config.md b/config.md index 6f1d1dea7..384cab21b 100644 --- a/config.md +++ b/config.md @@ -2,7 +2,8 @@ The container's top-level directory MUST contain a configuration file called `config.json`. The canonical schema is defined in this document, but there is a JSON Schema in [`schema/config-schema.json`](schema/config-schema.json) and Go bindings in [`specs-go/config.go`](specs-go/config.go). -Platform-specific configuration schema are defined in the [platform-specific documents](#platform-specific-configuration) linked below. +[Platform](spec.md#platforms)-specific configuration schema are defined in the [platform-specific documents](#platform-specific-configuration) linked below. +For properties that are only defined for some [platforms](spec.md#platforms), the Go property has a `platform` tag listing those protocols (e.g. `platform:"linux,solaris"`). The configuration file contains metadata necessary to implement standard operations against the container. This includes the process to run, environment variables to inject, sandboxing features to use, etc. diff --git a/spec.md b/spec.md index 2d7d034b8..8c6e41a2b 100644 --- a/spec.md +++ b/spec.md @@ -2,7 +2,9 @@ The [Open Container Initiative](http://www.opencontainers.org/) develops specifications for standards on Operating System process and application containers. -Protocols defined by this specification are: +# Platforms + +Platforms defined by this specification are: * `linux`: [runtime.md](runtime.md), [config.md](config.md), [config-linux.md](config-linux.md), and [runtime-linux.md](runtime-linux.md). * `solaris`: [runtime.md](runtime.md), [config.md](config.md), and [config-solaris.md](config-solaris.md). @@ -28,8 +30,8 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S The key words "unspecified", "undefined", and "implementation-defined" are to be interpreted as described in the [rationale for the C99 standard][c99-unspecified]. -An implementation is not compliant for a given CPU architecture if it fails to satisfy one or more of the MUST, REQUIRED, or SHALL requirements for the protocols it implements. -An implementation is compliant for a given CPU architecture if it satisfies all the MUST, REQUIRED, and SHALL requirements for the protocols it implements. +An implementation is not compliant for a given CPU architecture if it fails to satisfy one or more of the MUST, REQUIRED, or SHALL requirements for the [platforms](#platforms) it implements. +An implementation is compliant for a given CPU architecture if it satisfies all the MUST, REQUIRED, and SHALL requirements for the [platforms](#platforms) it implements. [c99-unspecified]: http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf#page=18 [rfc2119]: http://tools.ietf.org/html/rfc2119