Versions in this module Expand all Collapse all v0 v0.7.1 Dec 6, 2013 Changes in this version + const APIVERSION + const DEFAULTHTTPHOST + const DEFAULTHTTPPORT + const DEFAULTTAG + const DEFAULTUNIXSOCKET + const DefaultNetworkBridge + const DisableNetworkBridge + const LxcTemplate + const MaxImageDepth + const PortSpecTemplate + const PortSpecTemplateFormat + var ErrConflictAttachDetach = errors.New("Conflicting options: -a and -d") + var ErrConflictDetachAutoRemove = errors.New("Conflicting options: -rm and -d") + var ErrConnectionRefused = errors.New("Can't connect to docker daemon. Is 'docker -d' running on this host?") + var ErrContainerStart = errors.New("The container failed to start. Unkown error") + var ErrContainerStartTimeout = errors.New("The container failed to start due to timed out.") + var ErrImageReferenced = errors.New("Image referenced by a repository") + var ErrInvalidWorikingDirectory = errors.New("The working directory is invalid. It needs to be an absolute path.") + var ErrNoTTY = errors.New("No PTY found") + var ErrNotATTY = errors.New("The PTY is not a file") + var GITCOMMIT string + var LxcTemplateCompiled *template.Template + var VERSION string + func AttachProfiler(router *mux.Router) + func BtrfsReflink(fd_out, fd_in uintptr) error — linux/amd64 + func CompareConfig(a, b *Config) bool + func CopyFile(dstFile, srcFile *os.File) error — darwin/amd64, linux/amd64 + func CreateBridgeIface(config *DaemonConfig) error + func GenerateID() string + func ListenAndServe(proto, addr string, srv *Server, logging bool) error + func MergeConfig(userConf, imageConf *Config) error + func MkBuildContext(dockerfile string, files [][2]string) (archive.Archive, error) + func ParseCommands(proto, addr string, args ...string) error + func ParseRun(args []string, capabilities *Capabilities) (*Config, *HostConfig, *flag.FlagSet, error) + func PrintTreeNode(cli *DockerCli, noTrunc *bool, image APIImages, prefix string) + func RootIsShared() bool + func ServeRequest(srv *Server, apiversion float64, w http.ResponseWriter, req *http.Request) error + func StoreImage(img *Image, jsonData []byte, layerData archive.Archive, root, layer string) error + func ValidateAttach(val string) (string, error) + func ValidateEnv(val string) (string, error) + func ValidateHost(val string) (string, error) + func ValidateID(id string) error + func ValidateIp4Address(val string) (string, error) + func ValidateLink(val string) (string, error) + func ValidatePath(val string) (string, error) + func WalkTree(cli *DockerCli, noTrunc *bool, images []APIImages, ...) + type APIAuth struct + Status string + type APIContainer struct + HostConfig *HostConfig + type APIContainers struct + Command string + Created int64 + ID string + Image string + Names []string + Ports []APIPort + SizeRootFs int64 + SizeRw int64 + Status string + func (api APIContainers) ToLegacy() *APIContainersOld + type APIContainersOld struct + Command string + Created int64 + ID string + Image string + Ports string + SizeRootFs int64 + SizeRw int64 + Status string + type APICopy struct + HostPath string + Resource string + type APIHistory struct + Created int64 + CreatedBy string + ID string + Size int64 + Tags []string + type APIID struct + ID string + type APIImageConfig struct + ID string + type APIImages struct + Created int64 + ID string + ParentId string + RepoTags []string + Size int64 + VirtualSize int64 + func (api APIImages) ToLegacy() []APIImagesOld + type APIImagesOld struct + Created int64 + ID string + Repository string + Size int64 + Tag string + VirtualSize int64 + type APIInfo struct + Containers int + Debug bool + Driver string + DriverStatus [][2]string + IPv4Forwarding bool + Images int + IndexServerAddress string + KernelVersion string + LXCVersion string + MemoryLimit bool + NEventsListener int + NFd int + NGoroutines int + SwapLimit bool + type APIPort struct + IP string + PrivatePort int64 + PublicPort int64 + Type string + type APIRmi struct + Deleted string + Untagged string + type APIRun struct + ID string + Warnings []string + type APITop struct + Processes [][]string + Titles []string + type APIVersion struct + GitCommit string + GoVersion string + Version string + type APIWait struct + StatusCode int + type BindMap struct + DstPath string + Mode string + SrcPath string + type BuildFile interface + Build func(io.Reader) (string, error) + CmdFrom func(string) error + CmdRun func(string) error + func NewBuildFile(srv *Server, outStream, errStream io.Writer, verbose, utilizeCache, rm bool, ...) BuildFile + type Capabilities struct + AppArmor bool + IPv4ForwardingDisabled bool + MemoryLimit bool + SwapLimit bool + type Change struct + type Config struct + AttachStderr bool + AttachStdin bool + AttachStdout bool + Cmd []string + CpuShares int64 + Dns []string + Domainname string + Entrypoint []string + Env []string + ExposedPorts map[Port]struct{} + Hostname string + Image string + Memory int64 + MemorySwap int64 + NetworkDisabled bool + OpenStdin bool + PortSpecs []string + StdinOnce bool + Tty bool + User string + Volumes map[string]struct{} + VolumesFrom string + WorkingDir string + type Container struct + Args []string + Config *Config + Created time.Time + Driver string + HostnamePath string + HostsPath string + ID string + Image string + Name string + NetworkSettings *NetworkSettings + Path string + ResolvConfPath string + State State + SysInitPath string + Volumes map[string]string + VolumesRW map[string]bool + func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, stdout io.Writer, stderr io.Writer) chan error + func (container *Container) Changes() ([]archive.Change, error) + func (container *Container) Cmd() *exec.Cmd + func (container *Container) Copy(resource string) (archive.Archive, error) + func (container *Container) EnsureMounted() error + func (container *Container) EnvConfigPath() string + func (container *Container) Export() (archive.Archive, error) + func (container *Container) ExportRw() (archive.Archive, error) + func (container *Container) Exposes(p Port) bool + func (container *Container) FromDisk() error + func (container *Container) GetImage() (*Image, error) + func (container *Container) GetPtyMaster() (*os.File, error) + func (container *Container) GetSize() (int64, int64) + func (container *Container) Inject(file io.Reader, pth string) error + func (container *Container) Kill() error + func (container *Container) Mount() error + func (container *Container) Output() (output []byte, err error) + func (container *Container) ReadLog(name string) (io.Reader, error) + func (container *Container) Resize(h, w int) error + func (container *Container) Restart(seconds int) error + func (container *Container) RootfsPath() string + func (container *Container) Run() error + func (container *Container) Start() (err error) + func (container *Container) StderrPipe() (io.ReadCloser, error) + func (container *Container) StdinPipe() (io.WriteCloser, error) + func (container *Container) StdoutPipe() (io.ReadCloser, error) + func (container *Container) Stop(seconds int) error + func (container *Container) ToDisk() (err error) + func (container *Container) Unmount() error + func (container *Container) Wait() int + func (container *Container) WaitTimeout(timeout time.Duration) error + func (container *Container) When() time.Time + type DaemonConfig struct + AutoRestart bool + BridgeIface string + DefaultIp net.IP + Dns []string + EnableCors bool + EnableIptables bool + GraphDriver string + InterContainerCommunication bool + Pidfile string + Root string + func ConfigFromJob(job *engine.Job) *DaemonConfig + type DockerCli struct + func NewDockerCli(in io.ReadCloser, out, err io.Writer, proto, addr string) *DockerCli + func (cli *DockerCli) CmdAttach(args ...string) error + func (cli *DockerCli) CmdBuild(args ...string) error + func (cli *DockerCli) CmdCommit(args ...string) error + func (cli *DockerCli) CmdCp(args ...string) error + func (cli *DockerCli) CmdDiff(args ...string) error + func (cli *DockerCli) CmdEvents(args ...string) error + func (cli *DockerCli) CmdExport(args ...string) error + func (cli *DockerCli) CmdHelp(args ...string) error + func (cli *DockerCli) CmdHistory(args ...string) error + func (cli *DockerCli) CmdImages(args ...string) error + func (cli *DockerCli) CmdImport(args ...string) error + func (cli *DockerCli) CmdInfo(args ...string) error + func (cli *DockerCli) CmdInsert(args ...string) error + func (cli *DockerCli) CmdInspect(args ...string) error + func (cli *DockerCli) CmdKill(args ...string) error + func (cli *DockerCli) CmdLoad(args ...string) error + func (cli *DockerCli) CmdLogin(args ...string) error + func (cli *DockerCli) CmdLogs(args ...string) error + func (cli *DockerCli) CmdPort(args ...string) error + func (cli *DockerCli) CmdPs(args ...string) error + func (cli *DockerCli) CmdPull(args ...string) error + func (cli *DockerCli) CmdPush(args ...string) error + func (cli *DockerCli) CmdRestart(args ...string) error + func (cli *DockerCli) CmdRm(args ...string) error + func (cli *DockerCli) CmdRmi(args ...string) error + func (cli *DockerCli) CmdRun(args ...string) error + func (cli *DockerCli) CmdSave(args ...string) error + func (cli *DockerCli) CmdSearch(args ...string) error + func (cli *DockerCli) CmdStart(args ...string) error + func (cli *DockerCli) CmdStop(args ...string) error + func (cli *DockerCli) CmdTag(args ...string) error + func (cli *DockerCli) CmdTop(args ...string) error + func (cli *DockerCli) CmdVersion(args ...string) error + func (cli *DockerCli) CmdWait(args ...string) error + func (cli *DockerCli) LoadConfigFile() (err error) + func (cli *DockerCli) Subcmd(name, signature, description string) *flag.FlagSet + type Graph struct + Root string + func NewGraph(root string, driver graphdriver.Driver) (*Graph, error) + func (graph *Graph) ByParent() (map[string][]*Image, error) + func (graph *Graph) Create(layerData archive.Archive, container *Container, comment, author string, ...) (*Image, error) + func (graph *Graph) Delete(name string) error + func (graph *Graph) Driver() graphdriver.Driver + func (graph *Graph) Exists(id string) bool + func (graph *Graph) Get(name string) (*Image, error) + func (graph *Graph) Heads() (map[string]*Image, error) + func (graph *Graph) IsNotExist(err error) bool + func (graph *Graph) Map() (map[string]*Image, error) + func (graph *Graph) Mktemp(id string) (string, error) + func (graph *Graph) Register(jsonData []byte, layerData archive.Archive, img *Image) (err error) + func (graph *Graph) TempLayerArchive(id string, compression archive.Compression, sf *utils.StreamFormatter, ...) (*archive.TempArchive, error) + type History []*Container + func (history *History) Add(container *Container) + func (history *History) Len() int + func (history *History) Less(i, j int) bool + func (history *History) Swap(i, j int) + type HostConfig struct + Binds []string + ContainerIDFile string + Links []string + LxcConf []KeyValuePair + PortBindings map[Port][]PortBinding + Privileged bool + PublishAllPorts bool + type HttpApiFunc func(srv *Server, version float64, w http.ResponseWriter, r *http.Request, ...) error + type IPAllocator struct + func (alloc *IPAllocator) Acquire() (net.IP, error) + func (alloc *IPAllocator) Close() error + func (alloc *IPAllocator) Release(ip net.IP) + type Image struct + Architecture string + Author string + Comment string + Config *Config + Container string + ContainerConfig Config + Created time.Time + DockerVersion string + ID string + Parent string + Size int64 + func LoadImage(root string) (*Image, error) + func NewImgJSON(src []byte) (*Image, error) + func (img *Image) Depth() (int, error) + func (img *Image) GetParent() (*Image, error) + func (img *Image) History() ([]*Image, error) + func (img *Image) SaveSize(root string) error + func (img *Image) TarLayer() (archive.Archive, error) + func (img *Image) WalkHistory(handler func(*Image) error) (err error) + type KeyValuePair struct + Key string + Value string + type Link struct + BridgeInterface string + ChildEnvironment []string + ChildIP string + IsEnabled bool + Name string + ParentIP string + Ports []Port + func NewLink(parent, child *Container, name, bridgeInterface string) (*Link, error) + func (l *Link) Alias() string + func (l *Link) Disable() + func (l *Link) Enable() error + func (l *Link) ToEnv() []string + type ListOpts struct + func NewListOpts(validator ValidatorFctType) ListOpts + func (opts *ListOpts) Delete(key string) + func (opts *ListOpts) Get(key string) bool + func (opts *ListOpts) GetAll() []string + func (opts *ListOpts) GetMap() map[string]struct{} + func (opts *ListOpts) Len() int + func (opts *ListOpts) Set(value string) error + func (opts *ListOpts) String() string + type Nat struct + Binding PortBinding + Port Port + func (n *Nat) String() string + type NetworkInterface struct + Gateway net.IP + IPNet net.IPNet + func (iface *NetworkInterface) AllocatePort(port Port, binding PortBinding) (*Nat, error) + func (iface *NetworkInterface) Release() + type NetworkManager struct + func (manager *NetworkManager) Allocate() (*NetworkInterface, error) + func (manager *NetworkManager) Close() error + type NetworkSettings struct + Bridge string + Gateway string + IPAddress string + IPPrefixLen int + PortMapping map[string]PortMapping + Ports map[Port][]PortBinding + func (settings *NetworkSettings) PortMappingAPI() []APIPort + type Port string + func NewPort(proto, port string) Port + func (p Port) Int() int + func (p Port) Port() string + func (p Port) Proto() string + type PortAllocator struct + func (alloc *PortAllocator) Acquire(addr net.IP, port int) (int, error) + func (alloc *PortAllocator) Close() error + func (alloc *PortAllocator) Release(addr net.IP, port int) error + type PortBinding struct + HostIp string + HostPort string + type PortMapper struct + func (mapper *PortMapper) Map(ip net.IP, port int, backendAddr net.Addr) error + func (mapper *PortMapper) Unmap(ip net.IP, port int, proto string) error + type PortMapping map[string]string + type Repository map[string]string + type Runtime struct + func NewRuntime(config *DaemonConfig) (*Runtime, error) + func NewRuntimeFromDirectory(config *DaemonConfig) (*Runtime, error) + func (runtime *Runtime) Changes(container *Container) ([]archive.Change, error) + func (runtime *Runtime) Children(name string) (map[string]*Container, error) + func (runtime *Runtime) Close() error + func (runtime *Runtime) Commit(container *Container, repository, tag, comment, author string, config *Config) (*Image, error) + func (runtime *Runtime) Create(config *Config, name string) (*Container, []string, error) + func (runtime *Runtime) Destroy(container *Container) error + func (runtime *Runtime) Diff(container *Container) (archive.Archive, error) + func (runtime *Runtime) Exists(id string) bool + func (runtime *Runtime) Get(name string) *Container + func (runtime *Runtime) GetByName(name string) (*Container, error) + func (runtime *Runtime) Graph() *Graph + func (runtime *Runtime) List() []*Container + func (runtime *Runtime) LogToDisk(src *utils.WriteBroadcaster, dst, stream string) error + func (runtime *Runtime) Mount(container *Container) error + func (runtime *Runtime) Nuke() error + func (runtime *Runtime) Register(container *Container) error + func (runtime *Runtime) RegisterLink(parent, child *Container, alias string) error + func (runtime *Runtime) Unmount(container *Container) error + func (runtime *Runtime) UpdateCapabilities(quiet bool) + type Server struct + Eng *engine.Engine + func NewServer(eng *engine.Engine, config *DaemonConfig) (*Server, error) + func (srv *Server) AddEvent(jm utils.JSONMessage) + func (srv *Server) Close() error + func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, stderr bool, inStream io.ReadCloser, ...) error + func (srv *Server) ContainerChanges(name string) ([]archive.Change, error) + func (srv *Server) ContainerCommit(name, repo, tag, author, comment string, config *Config) (string, error) + func (srv *Server) ContainerCopy(name string, resource string, out io.Writer) error + func (srv *Server) ContainerCreate(job *engine.Job) engine.Status + func (srv *Server) ContainerDestroy(name string, removeVolume, removeLink bool) error + func (srv *Server) ContainerExport(name string, out io.Writer) error + func (srv *Server) ContainerInspect(name string) (*Container, error) + func (srv *Server) ContainerKill(name string, sig int) error + func (srv *Server) ContainerResize(name string, h, w int) error + func (srv *Server) ContainerRestart(name string, t int) error + func (srv *Server) ContainerStart(job *engine.Job) engine.Status + func (srv *Server) ContainerStop(name string, t int) error + func (srv *Server) ContainerTag(name, repo, tag string, force bool) error + func (srv *Server) ContainerTop(name, psArgs string) (*APITop, error) + func (srv *Server) ContainerWait(name string) (int, error) + func (srv *Server) Containers(all, size bool, n int, since, before string) []APIContainers + func (srv *Server) DockerInfo() *APIInfo + func (srv *Server) DockerVersion() APIVersion + func (srv *Server) GetEvents() []utils.JSONMessage + func (srv *Server) HTTPRequestFactory(metaHeaders map[string][]string) *utils.HTTPRequestFactory + func (srv *Server) ImageDelete(name string, autoPrune bool) ([]APIRmi, error) + func (srv *Server) ImageExport(name string, out io.Writer) error + func (srv *Server) ImageGetCached(imgID string, config *Config) (*Image, error) + func (srv *Server) ImageHistory(name string) ([]APIHistory, error) + func (srv *Server) ImageImport(src, repo, tag string, in io.Reader, out io.Writer, sf *utils.StreamFormatter) error + func (srv *Server) ImageInsert(name, url, path string, out io.Writer, sf *utils.StreamFormatter) error + func (srv *Server) ImageInspect(name string) (*Image, error) + func (srv *Server) ImageLoad(in io.Reader) error + func (srv *Server) ImagePull(localName string, tag string, out io.Writer, sf *utils.StreamFormatter, ...) error + func (srv *Server) ImagePush(localName string, out io.Writer, sf *utils.StreamFormatter, ...) error + func (srv *Server) Images(all bool, filter string) ([]APIImages, error) + func (srv *Server) ImagesSearch(term string) ([]registry.SearchResult, error) + func (srv *Server) ImagesViz(out io.Writer) error + func (srv *Server) ListenAndServe(job *engine.Job) engine.Status + func (srv *Server) LogEvent(action, id, from string) *utils.JSONMessage + func (srv *Server) RegisterLinks(name string, hostConfig *HostConfig) error + type State struct + ExitCode int + FinishedAt time.Time + Ghost bool + Pid int + Running bool + StartedAt time.Time + func (s *State) GetExitCode() int + func (s *State) IsGhost() bool + func (s *State) IsRunning() bool + func (s *State) SetGhost(val bool) + func (s *State) SetRunning(pid int) + func (s *State) SetStopped(exitCode int) + func (s *State) String() string + type StderrFormater struct + func (sf *StderrFormater) Write(buf []byte) (int, error) + type StdoutFormater struct + func (sf *StdoutFormater) Write(buf []byte) (int, error) + type TagStore struct + Repositories map[string]Repository + func NewTagStore(path string, graph *Graph) (*TagStore, error) + func (store *TagStore) ByID() map[string][]string + func (store *TagStore) Delete(repoName, tag string) (bool, error) + func (store *TagStore) DeleteAll(id string) error + func (store *TagStore) Get(repoName string) (Repository, error) + func (store *TagStore) GetImage(repoName, tagOrID string) (*Image, error) + func (store *TagStore) ImageName(id string) string + func (store *TagStore) LookupImage(name string) (*Image, error) + func (store *TagStore) Reload() error + func (store *TagStore) Save() error + func (store *TagStore) Set(repoName, tag, imageName string, force bool) error + type ValidatorFctType func(val string) (string, error)