Documentation ¶
Index ¶
- Constants
- type HookBuilder
- func (b *HookBuilder) AddDnsNameserver(nameserver string)
- func (b *HookBuilder) AddDnsOption(opt string)
- func (b *HookBuilder) AddDnsSearch(search string)
- func (b *HookBuilder) AddHost(host, ip string)
- func (b *HookBuilder) AddNetwork(networkID string)
- func (b *HookBuilder) AddPortMapEntry(entry PortMapEntry)
- func (b *HookBuilder) Build(spec *generate.Generator) (err error)
- func (b *HookBuilder) SetDomainname(domainname string)
- type NetConfig
- type PortMapEntry
- type SpecBuilder
- func (b *SpecBuilder) AddAllProcessCapabilities()
- func (b *SpecBuilder) AddExposedPorts(ports []string)
- func (b *SpecBuilder) ApplyImage(img ispecs.Image)
- func (b *SpecBuilder) DropAllProcessCapabilities()
- func (b *SpecBuilder) SetLinuxSeccomp(profile *rspecs.LinuxSeccomp)
- func (b *SpecBuilder) SetLinuxSeccompDefault()
- func (b *SpecBuilder) SetLinuxSeccompUnconfined()
- func (b *SpecBuilder) SetPRootPath(prootPath string)
- func (b *SpecBuilder) SetProcessCmd(v []string)
- func (b *SpecBuilder) SetProcessEntrypoint(v []string)
- func (b *SpecBuilder) SetProcessUser(user idutils.User)
- func (b *SpecBuilder) Spec(rootfs string) (spec *rspecs.Spec, err error)
- func (b *SpecBuilder) ToRootless()
- func (b *SpecBuilder) UseHostNetwork()
Constants ¶
View Source
const ANNOTATION_HOOK_ARGS = "com.github.mgoltzsche.cntnr.bundle.hook.args"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HookBuilder ¶
type HookBuilder struct {
// contains filtered or unexported fields
}
func NewHookBuilderFromSpec ¶
func NewHookBuilderFromSpec(spec *specs.Spec) (b HookBuilder, err error)
func (*HookBuilder) AddDnsNameserver ¶
func (b *HookBuilder) AddDnsNameserver(nameserver string)
func (*HookBuilder) AddDnsOption ¶
func (b *HookBuilder) AddDnsOption(opt string)
func (*HookBuilder) AddDnsSearch ¶
func (b *HookBuilder) AddDnsSearch(search string)
func (*HookBuilder) AddHost ¶
func (b *HookBuilder) AddHost(host, ip string)
func (*HookBuilder) AddNetwork ¶
func (b *HookBuilder) AddNetwork(networkID string)
func (*HookBuilder) AddPortMapEntry ¶
func (b *HookBuilder) AddPortMapEntry(entry PortMapEntry)
func (*HookBuilder) SetDomainname ¶
func (b *HookBuilder) SetDomainname(domainname string)
type NetConfig ¶
type NetConfig struct { DnsNameserver []string `json:"dns,omitempty"` DnsSearch []string `json:"dns_search,omitempty"` DnsOptions []string `json:"dns_options,omitempty"` Domainname string `json:"domainname,omitempty"` Hosts map[string]string `json:"hosts,omitempty"` Networks []string `json:"networks,omitempty"` Ports []PortMapEntry `json:"ports,omitempty"` }
type PortMapEntry ¶
type PortMapEntry struct { Target uint16 `json:"target"` Published uint16 `json:"published,omitempty"` Protocol string `json:"protocol,omitempty"` IP string `json:"ip,omitempty"` }
func (PortMapEntry) String ¶
func (p PortMapEntry) String() string
type SpecBuilder ¶
func FromSpec ¶
func FromSpec(spec *rspecs.Spec) SpecBuilder
func NewSpecBuilder ¶
func NewSpecBuilder() SpecBuilder
func (*SpecBuilder) AddAllProcessCapabilities ¶
func (b *SpecBuilder) AddAllProcessCapabilities()
func (*SpecBuilder) AddExposedPorts ¶
func (b *SpecBuilder) AddExposedPorts(ports []string)
func (*SpecBuilder) ApplyImage ¶
func (b *SpecBuilder) ApplyImage(img ispecs.Image)
See image to runtime spec conversion rules: https://github.com/opencontainers/image-spec/blob/master/conversion.md
func (*SpecBuilder) DropAllProcessCapabilities ¶
func (b *SpecBuilder) DropAllProcessCapabilities()
func (*SpecBuilder) SetLinuxSeccomp ¶
func (b *SpecBuilder) SetLinuxSeccomp(profile *rspecs.LinuxSeccomp)
func (*SpecBuilder) SetLinuxSeccompDefault ¶
func (b *SpecBuilder) SetLinuxSeccompDefault()
Derives a reasonable default seccomp from the current spec
func (*SpecBuilder) SetLinuxSeccompUnconfined ¶
func (b *SpecBuilder) SetLinuxSeccompUnconfined()
func (*SpecBuilder) SetPRootPath ¶
func (b *SpecBuilder) SetPRootPath(prootPath string)
func (*SpecBuilder) SetProcessCmd ¶
func (b *SpecBuilder) SetProcessCmd(v []string)
func (*SpecBuilder) SetProcessEntrypoint ¶
func (b *SpecBuilder) SetProcessEntrypoint(v []string)
func (*SpecBuilder) SetProcessUser ¶
func (b *SpecBuilder) SetProcessUser(user idutils.User)
func (*SpecBuilder) ToRootless ¶
func (b *SpecBuilder) ToRootless()
func (*SpecBuilder) UseHostNetwork ¶
func (b *SpecBuilder) UseHostNetwork()
Click to show internal directories.
Click to hide internal directories.