Documentation
¶
Index ¶
Constants ¶
View Source
const ( MOUNT_TYPE_VOLUME = MountType("volume") MOUNT_TYPE_BIND = MountType("bind") MOUNT_TYPE_TMPFS = MountType("tmpfs") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompoundServices ¶
type CompoundServices struct {
Dir string `json:"-"`
Services map[string]Service `json:"services"`
Volumes map[string]Volume `json:"volumes,omitempty"`
}
func FromJSON ¶
func FromJSON(b []byte) (r CompoundServices, err error)
func (*CompoundServices) JSON ¶
func (c *CompoundServices) JSON() string
type ImageBuild ¶
type NetConf ¶
type NetConf struct {
Hostname string `json:"hostname,omitempty"`
Domainname string `json:"domainname,omitempty"`
Dns []string `json:"dns,omitempty"`
DnsSearch []string `json:"dns_search,omitempty"`
DnsOptions []string `json:"dns_options,omitempty"`
ExtraHosts []ExtraHost `json:"extra_hosts,omitempty"`
Ports []PortBinding `json:"ports,omitempty"`
Networks []string `json:"networks,omitempty"`
}
type PathResolver ¶
func NewPathResolver ¶
func NewPathResolver(baseDir string) PathResolver
type PortBinding ¶
type PortBinding struct {
Target uint16 `json:"target"`
Published uint16 `json:"published,omitempty"`
Protocol string `json:"protocol,omitempty"`
IP string `json:"ip,omitempty"`
}
func (PortBinding) String ¶
func (p PortBinding) String() string
type Process ¶
type Process struct {
Entrypoint []string `json:"entrypoint,omitempty"`
Command []string `json:"command,omitempty"`
PRoot bool `json:"proot,omitempty"`
Cwd string `json:"working_dir,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
User *User `json:"user,omitempty"`
Privileged bool `json:"privileged",omitempty"`
CapAdd []string `json:"cap_add,omitempty"`
CapDrop []string `json:"cap_drop,omitempty"`
StdinOpen bool `json:"stdin_open,omitempty"`
Tty bool `json:"tty,omitempty"`
// TODO: expose in CLI
ApparmorProfile string `json:"app_armor_profile,omitempty"`
SelinuxLabel string `json:"process_label,omitempty"`
NoNewPrivileges bool `json:"no_new_privileges,omitempty"`
OOMScoreAdj *int `json:"oom_score_adj,omitempty"`
}
type ResourceResolver ¶
type ResourceResolver interface {
PathResolver
ResolveMountSource(VolumeMount) (string, error)
}
func NewResourceResolver ¶
func NewResourceResolver(paths PathResolver, vols map[string]Volume) ResourceResolver
type Service ¶
type Service struct {
Name string `json:"-"`
Bundle string `json:"bundle,omitempty"`
BundleUpdate bool `json:"bundle_update,omitempty"`
NoPivot bool `json:"no_pivot,omitempty"`
NoNewKeyring bool `json:"no_new_keyring,omitempty"`
Image string `json:"image,omitempty"`
Build *ImageBuild `json:"build,omitempty"`
Process
Seccomp string `json:"seccomp,omitempty"`
MountCgroups string `json:"cgroups_mount_option,omitempty"` // Not read from compose file. TODO: move to CLI only
NetConf
ReadOnly bool `json:"read_only,omitempty"`
Expose []string `json:"expose,omitempty"`
Volumes []VolumeMount `json:"volumes,omitempty"`
// TODO: handle check
HealthCheck *Check `json:"healthcheck,omitempty"`
StopSignal string `json:"stop_signal,omitempty"`
StopGracePeriod *time.Duration `json:"stop_grace_period,omitempty"`
}
func NewService ¶
type VolumeMount ¶
type VolumeMount struct {
Type MountType `json:"type,omitempty"`
Source string `json:"source,omitempty"`
Target string `json:"target,omitempty"`
Options []string `json:"options,omitempty"`
}
func (VolumeMount) IsNamedVolume ¶
func (m VolumeMount) IsNamedVolume() bool
func (VolumeMount) String ¶
func (m VolumeMount) String() string
Click to show internal directories.
Click to hide internal directories.