diff --git a/config-windows.md b/config-windows.md index 5a9578231..83fe82f40 100644 --- a/config-windows.md +++ b/config-windows.md @@ -205,3 +205,25 @@ The following parameters can be specified: } } ``` + +## JobContainer + +`jobContainer` is an OPTIONAL field of the Windows configuration. +If present, the container MUST be run as a Windows job container. This is a process or set of processes in a job object that is managed by the runtime. +If omitted, the container MUST be run as either a Windows Server Container, or with Hyper-V isolation if `hyperv` is supplied. +If `hyperv` and `jobContainer` are both present, the runtime MUST return an error. + +The following parameters can be specified: + +* **`rootfsMountPoint`** *(string, OPTIONAL)* - specifies the path that the container's rootfs volume should be mounted to. + If not supplied, the path will be determined by the runtime + +### Example + +```json +"windows": { + "jobContainer": { + "rootfsMountPoint": "C:\\foo\\bar\\baz" + } +} +``` diff --git a/schema/config-windows.json b/schema/config-windows.json index 68b51e902..ca0525229 100644 --- a/schema/config-windows.json +++ b/schema/config-windows.json @@ -93,6 +93,14 @@ "type": "string" } } + }, + "jobContainer": { + "type": "object", + "properties": { + "rootfsMountPoint": { + "type": "string" + } + } } }, "required": [ diff --git a/specs-go/config.go b/specs-go/config.go index c7c7c3d08..8a943cd70 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -489,6 +489,8 @@ type Windows struct { IgnoreFlushesDuringBoot bool `json:"ignoreFlushesDuringBoot,omitempty"` // HyperV contains information for running a container with Hyper-V isolation. HyperV *WindowsHyperV `json:"hyperv,omitempty"` + // JobContainer contains information for running a Windows job container. + JobContainer *WindowsJobContainer `json:"jobContainer,omitempty"` // Network restriction configuration. Network *WindowsNetwork `json:"network,omitempty"` } @@ -557,6 +559,13 @@ type WindowsHyperV struct { UtilityVMPath string `json:"utilityVMPath,omitempty"` } +// WindowsJobContainer contains information for configuring a job container on Windows. +type WindowsJobContainer struct { + // RootfsMountPoint is an optional path that indicates where the container's rootfs volume should + // be mounted on the host. + RootfsMountPoint string `json:"rootfsMountPoint,omitempty"` +} + // VM contains information for virtual-machine-based containers. type VM struct { // Hypervisor specifies hypervisor-related configuration for virtual-machine-based containers.