Documentation ¶
Index ¶
- Variables
- func Build(m Moby, w io.Writer, pull bool, tp string) error
- func Formats(base string, image []byte, 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, ...) error
- func OutputTypes() []string
- func SetLogOutput(out io.Writer)
- func Streamable(t string) bool
- func TrustedReference(image string) (reference.Reference, 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) error
ImageTar takes a Docker image and outputs it to a tar stream
func SetLogOutput ¶
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 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" json:"symlink,omitempty"` Contents *string `yaml:"contents" json:"contents,omitempty"` Source string `yaml:"source" json:"source,omitempty"` Metadata string `yaml:"metadata" json:"metadata,omitempty"` Optional bool `yaml:"optional" json:"optional"` Mode string `yaml:"mode" json:"mode,omitempty"` UID interface{} `yaml:"uid" json:"uid,omitempty"` GID interface{} `yaml:"gid" 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" json:"capabilities,omitempty"` Ambient *[]string `yaml:"ambient" json:"ambient,omitempty"` Mounts *[]specs.Mount `yaml:"mounts" json:"mounts,omitempty"` Binds *[]string `yaml:"binds" json:"binds,omitempty"` Tmpfs *[]string `yaml:"tmpfs" json:"tmpfs,omitempty"` Command *[]string `yaml:"command" json:"command,omitempty"` Env *[]string `yaml:"env" json:"env,omitempty"` Cwd string `yaml:"cwd" json:"cwd,omitempty"` Net string `yaml:"net" json:"net,omitempty"` Pid string `yaml:"pid" json:"pid,omitempty"` Ipc string `yaml:"ipc" json:"ipc,omitempty"` Uts string `yaml:"uts" json:"uts,omitempty"` Userns string `yaml:"userns" json:"userns,omitempty"` Hostname string `yaml:"hostname" json:"hostname,omitempty"` Readonly *bool `yaml:"readonly" json:"readonly,omitempty"` MaskedPaths *[]string `yaml:"maskedPaths" json:"maskedPaths,omitempty"` ReadonlyPaths *[]string `yaml:"readonlyPaths" json:"readonlyPaths,omitempty"` UID *interface{} `yaml:"uid" json:"uid,omitempty"` GID *interface{} `yaml:"gid" json:"gid,omitempty"` AdditionalGids *[]interface{} `yaml:"additionalGids" json:"additionalGids,omitempty"` NoNewPrivileges *bool `yaml:"noNewPrivileges" json:"noNewPrivileges,omitempty"` OOMScoreAdj *int `yaml:"oomScoreAdj" json:"oomScoreAdj,omitempty"` RootfsPropagation *string `yaml:"rootfsPropagation" json:"rootfsPropagation,omitempty"` CgroupsPath *string `yaml:"cgroupsPath" json:"cgroupsPath,omitempty"` Resources *specs.LinuxResources `yaml:"resources" json:"resources,omitempty"` Sysctl *map[string]string `yaml:"sysctl" json:"sysctl,omitempty"` Rlimits *[]string `yaml:"rlimits" json:"rlimits,omitempty"` UIDMappings *[]specs.LinuxIDMapping `yaml:"uidMappings" json:"uidMappings,omitempty"` GIDMappings *[]specs.LinuxIDMapping `yaml:"gidMappings" json:"gidMappings,omitempty"` Runtime *Runtime `yaml:"runtime" 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.
type Interface ¶
type Interface struct { Name string `yaml:"name" json:"name,omitempty"` Add string `yaml:"add" json:"add,omitempty"` Peer string `yaml:"peer" 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" json:"cmdline,omitempty"` Binary string `yaml:"binary" json:"binary,omitempty"` Tar *string `yaml:"tar" json:"tar,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" 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" 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" json:"cgroup,omitempty"` Ipc *string `yaml:"ipc" json:"ipc,omitempty"` Mnt *string `yaml:"mnt" json:"mnt,omitempty"` Net *string `yaml:"net" json:"net,omitempty"` Pid *string `yaml:"pid" json:"pid,omitempty"` User *string `yaml:"user" json:"user,omitempty"` Uts *string `yaml:"uts" json:"uts,omitempty"` }
Namespaces is the type for configuring paths to bind namespaces
type Runtime ¶
type Runtime struct { Cgroups *[]string `yaml:"cgroups" json:"cgroups,omitempty"` Mounts *[]specs.Mount `yaml:"mounts" json:"mounts,omitempty"` Mkdir *[]string `yaml:"mkdir" json:"mkdir,omitempty"` Interfaces *[]Interface `yaml:"interfaces" json:"interfaces,omitempty"` BindNS Namespaces `yaml:"bindNS" json:"bindNS,omitempty"` }
Runtime is the type of config processed at runtime, not used to build the OCI spec
func ConfigInspectToOCI ¶
func ConfigInspectToOCI(yaml *Image, inspect types.ImageInspect, idMap map[string]uint32) (specs.Spec, Runtime, error)
ConfigInspectToOCI converts a config and the output of image inspect to an OCI config
type TrustConfig ¶
type TrustConfig struct { Image []string `yaml:"image" json:"image,omitempty"` Org []string `yaml:"org" json:"org,omitempty"` }
TrustConfig is the type of a content trust config