Skip to content

Commit

Permalink
Merge pull request #828 from greenhouse-org/windows-layer-paths
Browse files Browse the repository at this point in the history
Add LayerFolders to Windows platform config
  • Loading branch information
tianon authored May 30, 2017
2 parents e6c9689 + 284ab58 commit aaa2481
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 @@ -340,7 +340,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 @@ -100,6 +108,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"`
// CredentialSpec contains a JSON object describing a group Managed Service Account (gMSA) specification.
Expand Down

0 comments on commit aaa2481

Please sign in to comment.