compose

package
v0.0.57 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(pwd string) string

Find finds the first compose* file according the default file names of docker-compose.

Types

type Compose

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

func New

func New(name, user, directory, file, datadirectory string, registries []string, nets, env []string, mount string) *Compose

New returns a pointer to an intialized Compose.

func (*Compose) AllowedExternalNetworks added in v0.0.9

func (c *Compose) AllowedExternalNetworks() error

AllowedExternalNetworks returns an error if any of the external networks are not allowed.

func (*Compose) AllowedVolumes added in v0.0.41

func (c *Compose) AllowedVolumes() error

AllowedVolumes returns an error if any of the volumes reference a directory outside of c.datadir

func (*Compose) Disallow added in v0.0.32

func (c *Compose) Disallow() error

Disallow parses the compose yaml, and disallows privileged=true, networkmode="host" and ipc="host" It also checks for 'ports' statements as those are _also_ disallowed.

func (*Compose) Down

func (c *Compose) Down(args []string) ([]byte, error)

func (*Compose) Exec added in v0.0.6

func (c *Compose) Exec(args []string) ([]byte, error)

func (*Compose) Extension added in v0.0.34

func (c *Compose) Extension() *Extension

func (*Compose) Load added in v0.0.35

func (c *Compose) Load(args []string) ([]byte, error)

Load loads the compose files and returns any errors.

func (*Compose) Login added in v0.0.17

func (c *Compose) Login(login string) error

func (*Compose) Logs

func (c *Compose) Logs(args []string) ([]byte, error)

func (*Compose) Ps

func (c *Compose) Ps(args []string) ([]byte, error)

func (*Compose) Pull

func (c *Compose) Pull(args []string) ([]byte, error)

func (*Compose) ReStart added in v0.0.6

func (c *Compose) ReStart(args []string) ([]byte, error)

func (*Compose) Start added in v0.0.6

func (c *Compose) Start(args []string) ([]byte, error)

func (*Compose) Stop added in v0.0.6

func (c *Compose) Stop(args []string) ([]byte, error)

func (*Compose) Up

func (c *Compose) Up(args []string) ([]byte, error)

type Extension added in v0.0.34

type Extension struct {
	Reload bool
}

Extension contains the fields of the PGO extensions in the docker compose file.

Jump to

Keyboard shortcuts

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