container

package
v0.11.18 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const LABEL_PREFIX = "io.clace."

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID         string `json:"ID"`
	Names      string `json:"Names"`
	Image      string `json:"Image"`
	State      string `json:"State"`
	Status     string `json:"Status"`
	PortString string `json:"Ports"`
	Port       int
}

type ContainerCommand

type ContainerCommand struct {
	*types.Logger
}

func (ContainerCommand) BuildImage

func (c ContainerCommand) BuildImage(config *types.SystemConfig, name ImageName, sourceUrl, containerFile string, containerArgs map[string]string) error

func (ContainerCommand) ExecTailN

func (c ContainerCommand) ExecTailN(command string, args []string, n int) ([]string, error)

ExecTailN executes a command and returns the last n lines of output

func (ContainerCommand) GetContainerLogs

func (c ContainerCommand) GetContainerLogs(config *types.SystemConfig, name ContainerName) (string, error)

func (ContainerCommand) GetContainers

func (c ContainerCommand) GetContainers(config *types.SystemConfig, name ContainerName, getAll bool) ([]Container, error)

func (ContainerCommand) GetImages

func (c ContainerCommand) GetImages(config *types.SystemConfig, name ImageName) ([]Image, error)

func (ContainerCommand) RemoveContainer

func (c ContainerCommand) RemoveContainer(config *types.SystemConfig, name ContainerName) error

func (ContainerCommand) RemoveImage

func (c ContainerCommand) RemoveImage(config *types.SystemConfig, name ImageName) error

func (ContainerCommand) RunContainer

func (c ContainerCommand) RunContainer(config *types.SystemConfig, appEntry *types.AppEntry, containerName ContainerName,
	imageName ImageName, port int64, envMap map[string]string, mountArgs []string,
	containerOptions map[string]string) error

func (ContainerCommand) StartContainer

func (c ContainerCommand) StartContainer(config *types.SystemConfig, name ContainerName) error

func (ContainerCommand) StopContainer

func (c ContainerCommand) StopContainer(config *types.SystemConfig, name ContainerName) error

func (ContainerCommand) VolumeCreate added in v0.6.5

func (c ContainerCommand) VolumeCreate(config *types.SystemConfig, name VolumeName) error

func (ContainerCommand) VolumeExists added in v0.6.5

func (c ContainerCommand) VolumeExists(config *types.SystemConfig, name VolumeName) bool

type ContainerName

type ContainerName string

func GenContainerName

func GenContainerName(appId types.AppId, contentHash string) ContainerName

type Image

type Image struct {
	Repository string `json:"Repository"`
}

type ImageName

type ImageName string

func GenImageName

func GenImageName(appId types.AppId, contentHash string) ImageName

type VolumeName added in v0.6.5

type VolumeName string

func GenVolumeName added in v0.6.5

func GenVolumeName(appId types.AppId, dirName string) VolumeName

Jump to

Keyboard shortcuts

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