From 759ee79c857f0c66243d000dc72b841761015179 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 6 May 2016 23:55:32 -0700 Subject: [PATCH 1/2] config: Add platform-specific entry for 'solaris' Fixup for 7c9daeb (Introducing Solaris in OCI, 2016-04-25, #411) along the lines of b373a15 (config: Split platform-specific configuration into its own section, 2016-05-02, #414). Signed-off-by: W. Trevor King --- config.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.md b/config.md index 07583749..cf1e0b69 100644 --- a/config.md +++ b/config.md @@ -207,6 +207,8 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th * **`linux`** (object, optional) [Linux-specific configuration](config-linux.md). This should only be set if **`platform.os`** is `linux`. +* **`solaris`** (object, optional) [Solaris-specific configuration](config-solaris.md). + This should only be set if **`platform.os`** is `solaris`. ### Example (Linux) From 5c2193f3576ed8756ff3755259c9e30df3ab3a72 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 6 May 2016 23:58:09 -0700 Subject: [PATCH 2/2] specs-go/config: Make Linux and Solaris omitempty Both fields are optional, so you could conceivably have neither. However, in most cases folks will populate the one corresponding to their platform. The one that *doesn't* match their platform must not show up, in order to avoid violating the: This should only be set if **`platform.os`** is ... phrasing. Signed-off-by: W. Trevor King --- specs-go/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs-go/config.go b/specs-go/config.go index fda11eec..e90acf74 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -24,9 +24,9 @@ type Spec struct { Annotations map[string]string `json:"annotations,omitempty"` // Linux is platform specific configuration for Linux based containers. - Linux Linux `json:"linux" platform:"linux"` + Linux Linux `json:"linux" platform:"linux,omitempty"` // Solaris is platform specific configuration for Solaris containers. - Solaris Solaris `json:"solaris" platform:"solaris"` + Solaris Solaris `json:"solaris" platform:"solaris,omitempty"` } // Process contains information to start a specific application inside the container.