mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
8b7bbf180f
buildkit supports entitlements like network-host and security-insecure. this patch aims to make it configurable through daemon.json file. by default network-host is enabled & secuirty-insecure is disabled. Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
29 lines
970 B
Go
29 lines
970 B
Go
package config
|
|
|
|
import "github.com/docker/docker/api/types/filters"
|
|
|
|
// BuilderGCRule represents a GC rule for buildkit cache
|
|
type BuilderGCRule struct {
|
|
All bool `json:",omitempty"`
|
|
Filter filters.Args `json:",omitempty"`
|
|
KeepStorage string `json:",omitempty"`
|
|
}
|
|
|
|
// BuilderGCConfig contains GC config for a buildkit builder
|
|
type BuilderGCConfig struct {
|
|
Enabled bool `json:",omitempty"`
|
|
Policy []BuilderGCRule `json:",omitempty"`
|
|
DefaultKeepStorage string `json:",omitempty"`
|
|
}
|
|
|
|
// BuilderEntitlements contains settings to enable/disable entitlements
|
|
type BuilderEntitlements struct {
|
|
NetworkHost *bool `json:"network-host,omitempty"`
|
|
SecurityInsecure *bool `json:"security-insecure,omitempty"`
|
|
}
|
|
|
|
// BuilderConfig contains config for the builder
|
|
type BuilderConfig struct {
|
|
GC BuilderGCConfig `json:",omitempty"`
|
|
Entitlements BuilderEntitlements `json:",omitempty"`
|
|
}
|