Skip to content

Commit 284ab58

Browse files
committed
Add LayerFolders to Windows platform config
Signed-off-by: Matthew Horan <[email protected]> Signed-off-by: Sunjay Bhatia <[email protected]>
1 parent 4aed614 commit 284ab58

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

config-windows.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
This document describes the schema for the [Windows-specific section](config.md#platform-specific-configuration) of the [container configuration](config.md).
44
The Windows container specification uses APIs provided by the Windows Host Compute Service (HCS) to fulfill the spec.
55

6+
## <a name="configWindowsLayerFolders" />LayerFolders
7+
8+
**`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.
9+
`layerFolders` MUST contain at least one entry.
10+
11+
### Example
12+
13+
```json
14+
"windows": {
15+
"layerFolders": [
16+
"C:\\Layers\\layer1",
17+
"C:\\Layers\\layer2"
18+
]
19+
}
20+
```
21+
622
## <a name="configWindowsResources" />Resources
723

824
You can configure a container's resource limits via the OPTIONAL `resources` field of the Windows configuration.

config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ Runtime implementations MAY support any valid values for platform-specific field
328328
* **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md).
329329
This MAY be set if **`platform.os`** is `linux` and MUST NOT be set otherwise.
330330
* **`windows`** (object, OPTIONAL) [Windows-specific configuration](config-windows.md).
331-
This MAY be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
331+
This MUST be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
332332
* **`solaris`** (object, OPTIONAL) [Solaris-specific configuration](config-solaris.md).
333333
This MAY be set if **`platform.os`** is `solaris` and MUST NOT be set otherwise.
334334

schema/config-windows.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
"id": "https://opencontainers.org/schema/bundle/windows",
55
"type": "object",
66
"properties": {
7+
"layerFolders": {
8+
"id": "https://opencontainers.org/schema/bundle/windows/layerFolders",
9+
"type": "array",
10+
"items": {
11+
"$ref": "defs.json#/definitions/FilePath"
12+
},
13+
"minItems": 1
14+
},
715
"resources": {
816
"id": "https://opencontainers.org/schema/bundle/windows/resources",
917
"type": "object",
@@ -66,6 +74,9 @@
6674
}
6775
}
6876
}
69-
}
77+
},
78+
"required": [
79+
"layerFolders"
80+
]
7081
}
7182
}

specs-go/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ type SolarisAnet struct {
430430

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

0 commit comments

Comments
 (0)