Skip to content

Commit

Permalink
Add LayerFolders to Windows platform config
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Horan <[email protected]>
Signed-off-by: Sunjay Bhatia <[email protected]>
  • Loading branch information
sunjayBhatia committed May 24, 2017
1 parent 4aed614 commit 284ab58
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
16 changes: 16 additions & 0 deletions config-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
This document describes the schema for the [Windows-specific section](config.md#platform-specific-configuration) of the [container configuration](config.md).
The Windows container specification uses APIs provided by the Windows Host Compute Service (HCS) to fulfill the spec.

## <a name="configWindowsLayerFolders" />LayerFolders

**`layerFolders`** (array of strings, REQUIRED) specifies a list of layer folders the container image relies on. The list is ordered from topmost layer to base layer.
`layerFolders` MUST contain at least one entry.

### Example

```json
"windows": {
"layerFolders": [
"C:\\Layers\\layer1",
"C:\\Layers\\layer2"
]
}
```

## <a name="configWindowsResources" />Resources

You can configure a container's resource limits via the OPTIONAL `resources` field of the Windows configuration.
Expand Down
2 changes: 1 addition & 1 deletion config.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ Runtime implementations MAY support any valid values for platform-specific field
* **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md).
This MAY be set if **`platform.os`** 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 MUST be set if **`platform.os`** 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.

Expand Down
13 changes: 12 additions & 1 deletion schema/config-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"id": "https://opencontainers.org/schema/bundle/windows",
"type": "object",
"properties": {
"layerFolders": {
"id": "https://opencontainers.org/schema/bundle/windows/layerFolders",
"type": "array",
"items": {
"$ref": "defs.json#/definitions/FilePath"
},
"minItems": 1
},
"resources": {
"id": "https://opencontainers.org/schema/bundle/windows/resources",
"type": "object",
Expand Down Expand Up @@ -66,6 +74,9 @@
}
}
}
}
},
"required": [
"layerFolders"
]
}
}
2 changes: 2 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ type SolarisAnet struct {

// Windows defines the runtime configuration for Windows based containers, including Hyper-V containers.
type Windows struct {
// LayerFolders contains a list of absolute paths to directories containing image layers.
LayerFolders []string `json:"layerFolders"`
// Resources contains information for handling resource constraints for the container.
Resources *WindowsResources `json:"resources,omitempty"`
}
Expand Down

0 comments on commit 284ab58

Please sign in to comment.