Skip to content

Commit aaa2481

Browse files
authored
Merge pull request #828 from greenhouse-org/windows-layer-paths
Add LayerFolders to Windows platform config
2 parents e6c9689 + 284ab58 commit aaa2481

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
@@ -340,7 +340,7 @@ Runtime implementations MAY support any valid values for platform-specific field
340340
* **`linux`** (object, OPTIONAL) [Linux-specific configuration](config-linux.md).
341341
This MAY be set if **`platform.os`** is `linux` and MUST NOT be set otherwise.
342342
* **`windows`** (object, OPTIONAL) [Windows-specific configuration](config-windows.md).
343-
This MAY be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
343+
This MUST be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.
344344
* **`solaris`** (object, OPTIONAL) [Solaris-specific configuration](config-solaris.md).
345345
This MAY be set if **`platform.os`** is `solaris` and MUST NOT be set otherwise.
346346

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",
@@ -100,6 +108,9 @@
100108
}
101109
}
102110
}
103-
}
111+
},
112+
"required": [
113+
"layerFolders"
114+
]
104115
}
105116
}

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
// CredentialSpec contains a JSON object describing a group Managed Service Account (gMSA) specification.

0 commit comments

Comments
 (0)