Documentation
¶
Index ¶
- Constants
- type Docker
- func (d *Docker) Connect() (err error)
- func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, ...) (*container.ContainerCreateCreatedBody, error)
- func (d *Docker) GetClient() *client.Client
- func (d *Docker) ImagePull(ctx context.Context, image string) error
- func (d *Docker) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error)
- func (d *Docker) StackDeploy(ctx context.Context, stackName string, composeFile []byte) (output string, err error)
- func (d *Docker) StackList(ctx context.Context) (output string, err error)
- func (d *Docker) StackRemove(ctx context.Context, stackName string) (output string, err error)
- func (d *Docker) StackServices(ctx context.Context, stackName string) (output string, err error)
- func (d *Docker) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error)
Constants ¶
View Source
const ( //DefaultURL docker default URL DefaultURL = "unix:///var/run/docker.sock" //DefaultVersion docker default version DefaultVersion = "1.27" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker wrapper
func (*Docker) ContainerCreate ¶
func (d *Docker) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, name string) (*container.ContainerCreateCreatedBody, error)
ContainerCreate creates a container and pulls the image if needed
func (*Docker) StackDeploy ¶ added in v0.9.1
func (d *Docker) StackDeploy(ctx context.Context, stackName string, composeFile []byte) (output string, err error)
StackDeploy deploy a stack
func (*Docker) StackRemove ¶ added in v0.9.1
StackRemove remove a stack
func (*Docker) StackServices ¶ added in v0.11.0
StackServices list the services of a stack
Click to show internal directories.
Click to hide internal directories.