Documentation ¶
Index ¶
- func ContainerExecResize(id string, height, width int) error
- func ContainerInspect(id string) (dockType.ContainerJSON, error)
- func ContainerList() ([]dockType.Container, error)
- func ContainerRemove(id string) error
- func ContainerStart(id string) error
- func ContainerStats(id string) (dockType.Stats, error)
- func ContainerStop(id string) error
- func CreateContainer(conf ContainerConfig) (dockType.ContainerJSON, error)
- func ExecInspect(id string) (dockType.ContainerExecInspect, error)
- func ExecPipe(resp dockType.HijackedResponse, inStream io.Reader, ...) error
- func ExecStart(execConfig ExecConfig) (dockType.ContainerExecCreateResponse, dockType.HijackedResponse, error)
- func GetContainer(name string) (dockType.ContainerJSON, error)
- func GetIP(i interface{}) (ip string)
- func ImageExists(name string) bool
- func ImageRemove(imageID string, force bool) error
- func Initialize(host string) error
- func VolumeCreate(name string) (dockType.Volume, error)
- func VolumeExists(name string) bool
- func VolumeList() ([]*dockType.Volume, error)
- func VolumeRemove(name string) error
- type ContainerConfig
- type ExecConfig
- type Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerExecResize ¶
resize the exec.
func ContainerInspect ¶
func ContainerInspect(id string) (dockType.ContainerJSON, error)
ContainerInspect
func ContainerStart ¶
Start a container. If the container is already running this will error.
func ContainerStats ¶
ContainerStats(ctx context.Context, containerID string, stream bool) (io.ReadCloser, error)
func ContainerStop ¶
give them 5 seconds.. todo maybe make it adjustable
func CreateContainer ¶
func CreateContainer(conf ContainerConfig) (dockType.ContainerJSON, error)
create a container from the user specification
func ExecInspect ¶
func ExecInspect(id string) (dockType.ContainerExecInspect, error)
func ExecStart ¶
func ExecStart(execConfig ExecConfig) (dockType.ContainerExecCreateResponse, dockType.HijackedResponse, error)
func ImageRemove ¶
func Initialize ¶
Types ¶
type ContainerConfig ¶
type ContainerConfig struct { ID string `json:"id"` Network string `json:"network"` NetName string `json:"networkname"` Name string `json:"name"` Labels map[string]string `json:"labels"` Hostname string `json:"hostname"` Domainname string `json:"domainname"` Cmd []string `json:"cmd"` Env []string `json:"env"` Image string `json:"image_slug"` IP string `json:"ip"` Binds []string `json:"binds"` Memory int64 `json:"memory"` MemorySwap int64 `json:"memory_swap"` Status string `json:"status"` RestartPolicy string `json:"restart_policy"` RestartAttempts int `json:"restart_attempts"` Ports []string `json:"ports"` }
func ContainerJSONtoConfig ¶
func ContainerJSONtoConfig(cj dockType.ContainerJSON) ContainerConfig
func ContainerSliceToConfigSlice ¶
func ContainerSliceToConfigSlice(cs []dockType.Container) []ContainerConfig
type ExecConfig ¶
Click to show internal directories.
Click to hide internal directories.