Documentation
¶
Index ¶
- Variables
- func Build(m Moby, w io.Writer, pull bool, tp string) error
- func Formats(base string, image string, formats []string, size int) error
- func GetReadOnlyAuthTransport(server string, scopes []string, username, password, rootCAPath string) (http.RoundTripper, error)
- func ImageBundle(prefix string, ref *reference.Spec, config []byte, runtime Runtime, ...) error
- func ImageTar(ref *reference.Spec, prefix string, tw tarWriter, trust bool, pull bool, ...) (e error)
- func OutputTypes() []string
- func Streamable(t string) bool
- func TrustedReference(image string) (reference.Reference, error)
- func UpdateOutputImages(update map[string]string) error
- func ValidateFormats(formats []string) error
- type File
- type Image
- type ImageConfig
- type Interface
- type KernelConfig
- type Moby
- type Namespaces
- type Runtime
- type TrustConfig
Constants ¶
This section is empty.
Variables ¶
var ( // MobyDir is the location of the cache directory, defaults to ~/.moby MobyDir string )
var ( // ReleasesRole is the role named "releases" ReleasesRole = data.RoleName(path.Join(data.CanonicalTargetsRole.String(), "releases")) )
Functions ¶
func GetReadOnlyAuthTransport ¶
func GetReadOnlyAuthTransport(server string, scopes []string, username, password, rootCAPath string) (http.RoundTripper, error)
GetReadOnlyAuthTransport gets the Auth Transport used to communicate with notary
func ImageBundle ¶
func ImageBundle(prefix string, ref *reference.Spec, config []byte, runtime Runtime, tw tarWriter, trust bool, pull bool, readonly bool, dupMap map[string]string) error
ImageBundle produces an OCI bundle at the given path in a tarball, given an image and a config.json
func ImageTar ¶
func ImageTar(ref *reference.Spec, prefix string, tw tarWriter, trust bool, pull bool, resolv string) (e error)
ImageTar takes a Docker image and outputs it to a tar stream
func Streamable ¶
Streamable returns true if an output can be streamed
func TrustedReference ¶
TrustedReference parses an image string, and does a notary lookup to verify and retrieve the signed digest reference
func UpdateOutputImages ¶
UpdateOutputImages overwrite the docker images used to build the outputs 'update' is a map where the key is the output format and the value is a LinuxKit 'mkimage' image.
func ValidateFormats ¶
ValidateFormats checks if the format type is known
Types ¶
type File ¶
type File struct {
Path string `yaml:"path" json:"path"`
Directory bool `yaml:"directory" json:"directory"`
Symlink string `yaml:"symlink,omitempty" json:"symlink,omitempty"`
Contents *string `yaml:"contents,omitempty" json:"contents,omitempty"`
Source string `yaml:"source,omitempty" json:"source,omitempty"`
Metadata string `yaml:"metadata,omitempty" json:"metadata,omitempty"`
Optional bool `yaml:"optional" json:"optional"`
Mode string `yaml:"mode,omitempty" json:"mode,omitempty"`
UID interface{} `yaml:"uid,omitempty" json:"uid,omitempty"`
GID interface{} `yaml:"gid,omitempty" json:"gid,omitempty"`
}
File is the type of a file specification
type Image ¶
type Image struct {
Name string `yaml:"name" json:"name"`
Image string `yaml:"image" json:"image"`
ImageConfig `yaml:",inline"`
}
Image is the type of an image config
type ImageConfig ¶
type ImageConfig struct {
Capabilities *[]string `yaml:"capabilities,omitempty" json:"capabilities,omitempty"`
Ambient *[]string `yaml:"ambient,omitempty" json:"ambient,omitempty"`
Mounts *[]specs.Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"`
Binds *[]string `yaml:"binds,omitempty" json:"binds,omitempty"`
Tmpfs *[]string `yaml:"tmpfs,omitempty" json:"tmpfs,omitempty"`
Command *[]string `yaml:"command,omitempty" json:"command,omitempty"`
Env *[]string `yaml:"env,omitempty" json:"env,omitempty"`
Cwd string `yaml:"cwd,omitempty" json:"cwd,omitempty"`
Net string `yaml:"net,omitempty" json:"net,omitempty"`
Pid string `yaml:"pid,omitempty" json:"pid,omitempty"`
Ipc string `yaml:"ipc,omitempty" json:"ipc,omitempty"`
Uts string `yaml:"uts,omitempty" json:"uts,omitempty"`
Userns string `yaml:"userns,omitempty" json:"userns,omitempty"`
Hostname string `yaml:"hostname,omitempty" json:"hostname,omitempty"`
Readonly *bool `yaml:"readonly,omitempty" json:"readonly,omitempty"`
MaskedPaths *[]string `yaml:"maskedPaths,omitempty" json:"maskedPaths,omitempty"`
ReadonlyPaths *[]string `yaml:"readonlyPaths,omitempty" json:"readonlyPaths,omitempty"`
UID *interface{} `yaml:"uid,omitempty" json:"uid,omitempty"`
GID *interface{} `yaml:"gid,omitempty" json:"gid,omitempty"`
AdditionalGids *[]interface{} `yaml:"additionalGids,omitempty" json:"additionalGids,omitempty"`
NoNewPrivileges *bool `yaml:"noNewPrivileges,omitempty" json:"noNewPrivileges,omitempty"`
OOMScoreAdj *int `yaml:"oomScoreAdj,omitempty" json:"oomScoreAdj,omitempty"`
RootfsPropagation *string `yaml:"rootfsPropagation,omitempty" json:"rootfsPropagation,omitempty"`
CgroupsPath *string `yaml:"cgroupsPath,omitempty" json:"cgroupsPath,omitempty"`
Resources *specs.LinuxResources `yaml:"resources,omitempty" json:"resources,omitempty"`
Sysctl *map[string]string `yaml:"sysctl,omitempty" json:"sysctl,omitempty"`
Rlimits *[]string `yaml:"rlimits,omitempty" json:"rlimits,omitempty"`
UIDMappings *[]specs.LinuxIDMapping `yaml:"uidMappings,omitempty" json:"uidMappings,omitempty"`
GIDMappings *[]specs.LinuxIDMapping `yaml:"gidMappings,omitempty" json:"gidMappings,omitempty"`
Annotations *map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"`
Runtime *Runtime `yaml:"runtime,omitempty" json:"runtime,omitempty"`
// contains filtered or unexported fields
}
ImageConfig is the configuration part of Image, it is the subset which is valid in a "org.mobyproject.config" label on an image. Everything except Runtime and ref is used to build the OCI spec
type Interface ¶
type Interface struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Add string `yaml:"add,omitempty" json:"add,omitempty"`
Peer string `yaml:"peer,omitempty" json:"peer,omitempty"`
CreateInRoot bool `yaml:"createInRoot" json:"createInRoot"`
}
Interface is the runtime config for network interfaces
type KernelConfig ¶
type KernelConfig struct {
Image string `yaml:"image" json:"image"`
Cmdline string `yaml:"cmdline,omitempty" json:"cmdline,omitempty"`
Binary string `yaml:"binary,omitempty" json:"binary,omitempty"`
Tar *string `yaml:"tar,omitempty" json:"tar,omitempty"`
UCode *string `yaml:"ucode,omitempty" json:"ucode,omitempty"`
// contains filtered or unexported fields
}
KernelConfig is the type of the config for a kernel
type Moby ¶
type Moby struct {
Kernel KernelConfig `kernel:"cmdline,omitempty" json:"kernel,omitempty"`
Init []string `init:"cmdline" json:"init"`
Onboot []*Image `yaml:"onboot" json:"onboot"`
Onshutdown []*Image `yaml:"onshutdown" json:"onshutdown"`
Services []*Image `yaml:"services" json:"services"`
Trust TrustConfig `yaml:"trust,omitempty" json:"trust,omitempty"`
Files []File `yaml:"files" json:"files"`
// contains filtered or unexported fields
}
Moby is the type of a Moby config file
type Namespaces ¶
type Namespaces struct {
Cgroup *string `yaml:"cgroup,omitempty" json:"cgroup,omitempty"`
Ipc *string `yaml:"ipc,omitempty" json:"ipc,omitempty"`
Mnt *string `yaml:"mnt,omitempty" json:"mnt,omitempty"`
Net *string `yaml:"net,omitempty" json:"net,omitempty"`
Pid *string `yaml:"pid,omitempty" json:"pid,omitempty"`
User *string `yaml:"user,omitempty" json:"user,omitempty"`
Uts *string `yaml:"uts,omitempty" json:"uts,omitempty"`
}
Namespaces is the type for configuring paths to bind namespaces
type Runtime ¶
type Runtime struct {
Cgroups *[]string `yaml:"cgroups,omitempty" json:"cgroups,omitempty"`
Mounts *[]specs.Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"`
Mkdir *[]string `yaml:"mkdir,omitempty" json:"mkdir,omitempty"`
Interfaces *[]Interface `yaml:"interfaces,omitempty,omitempty" json:"interfaces,omitempty"`
BindNS Namespaces `yaml:"bindNS,omitempty" json:"bindNS,omitempty"`
Namespace *string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
}
Runtime is the type of config processed at runtime, not used to build the OCI spec
type TrustConfig ¶
type TrustConfig struct {
Image []string `yaml:"image,omitempty" json:"image,omitempty"`
Org []string `yaml:"org,omitempty" json:"org,omitempty"`
}
TrustConfig is the type of a content trust config