By default, Docker containers are "unprivileged" and cannot, for example, run a Docker daemon inside a Docker container. We can have fine grain control over the capabilities using cap-add and cap-drop.More details [here](https://docs.docker.com/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration).
The relationship between Docker's capabilities and [Linux capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html)
// Container represents a single container that is expected to be run on the host.
typeContainerstruct{
// Required: This must be a DNS_LABEL. Each container in a pod must
...
...
@@ -267,6 +278,8 @@ type Container struct {
Privilegedbool`json:"privileged,omitempty" description:"whether or not the container is granted privileged status; defaults to false"`
// Optional: Policy for pulling images for this container
ImagePullPolicyPullPolicy`json:"imagePullPolicy" description:"image pull policy; one of PullAlways, PullNever, PullIfNotPresent; defaults to PullAlways if :latest tag is specified, or PullIfNotPresent otherwise"`
// Optional: Capabilities for container.
CapabilitiesCapabilities`json:"capabilities,omitempty" description:"capabilities for container"`
}
// Handler defines a specific action that should be taken
// Container represents a single container that is expected to be run on the host.
typeContainerstruct{
// Required: This must be a DNS_LABEL. Each container in a pod must
...
...
@@ -231,6 +242,8 @@ type Container struct {
Privilegedbool`json:"privileged,omitempty" description:"whether or not the container is granted privileged status; defaults to false"`
// Optional: Policy for pulling images for this container
ImagePullPolicyPullPolicy`json:"imagePullPolicy" description:"image pull policy; one of PullAlways, PullNever, PullIfNotPresent; defaults to PullAlways if :latest tag is specified, or PullIfNotPresent otherwise"`
// Optional: Capabilities for container.
CapabilitiesCapabilities`json:"capabilities,omitempty" description:"capabilities for container"`
}
// Handler defines a specific action that should be taken