compose

package
v0.0.0-...-eb599cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compose

type Compose struct {
	// contains filtered or unexported fields
}

Compose performs docker-compose tasks

func New

func New() (*Compose, error)

New returns a new Compose struct

func (*Compose) Build

func (c *Compose) Build(services []string) error

Build builds the service

func (*Compose) Exec

func (c *Compose) Exec(serviceName, stdin string, cmd string, args ...string) error

Exec executes the command inside the service's container

func (*Compose) IsRunning

func (c *Compose) IsRunning(serviceName string) (bool, error)

IsRunning returns whether the service is currently running

func (*Compose) ListAll

func (c *Compose) ListAll() ([]string, error)

ListAll returns a list of all service names

func (*Compose) Logs

func (c *Compose) Logs(services []string) error

Logs runs docker-compose logs

func (*Compose) Ports

func (c *Compose) Ports(serviceName string) ([]string, error)

Ports returns the host ports that the service exposes

func (*Compose) Run

func (c *Compose) Run(service string, env []string) error

Run starts the service, building first if necessary.

func (*Compose) Stop

func (c *Compose) Stop(services []string) error

Stop stops the service

func (*Compose) StopAll

func (c *Compose) StopAll() error

StopAll stops all docker-compose services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL