api: add configurable MaskedPaths and ReadOnlyPaths to the API
This adds MaskedPaths and ReadOnlyPaths options to HostConfig for containers so that a user can override the default values. When the value sent through the API is nil the default is used. Otherwise the default is overridden. Adds integration tests for MaskedPaths and ReadonlyPaths. Signed-off-by: Jess Frazelle <acidburn@microsoft.com> Upstream-commit: 3694c1e34e40fa2e255a97b5541645cec9c8d1d5 Component: engine
This commit is contained in:
@@ -772,6 +772,16 @@ definitions:
|
||||
- "default"
|
||||
- "process"
|
||||
- "hyperv"
|
||||
MaskedPaths:
|
||||
type: "array"
|
||||
description: "The list of paths to be masked inside the container (this overrides the default set of paths)"
|
||||
items:
|
||||
type: "string"
|
||||
ReadonlyPaths:
|
||||
type: "array"
|
||||
description: "The list of paths to be set as read-only inside the container (this overrides the default set of paths)"
|
||||
items:
|
||||
type: "string"
|
||||
|
||||
ContainerConfig:
|
||||
description: "Configuration for a container that is portable between hosts"
|
||||
|
||||
@@ -401,6 +401,12 @@ type HostConfig struct {
|
||||
// Mounts specs used by the container
|
||||
Mounts []mount.Mount `json:",omitempty"`
|
||||
|
||||
// MaskedPaths is the list of paths to be masked inside the container (this overrides the default set of paths)
|
||||
MaskedPaths []string
|
||||
|
||||
// ReadonlyPaths is the list of paths to be set as read-only inside the container (this overrides the default set of paths)
|
||||
ReadonlyPaths []string
|
||||
|
||||
// Run a custom init inside the container, if null, use the daemon's configured settings
|
||||
Init *bool `json:",omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user