Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Windows job containers #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions config-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,25 @@ The following parameters can be specified:
}
}
```

## <a name="configWindowsJobContainer" />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\\"
}
}
```
8 changes: 8 additions & 0 deletions schema/config-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@
"type": "string"
}
}
},
"jobContainer": {
"type": "object",
"properties": {
"rootfsMountPoint": {
"type": "string"
}
}
}
},
"required": [
Expand Down
9 changes: 9 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down Expand Up @@ -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.
Expand Down