docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BundlerNodeBeneficiaryAddressPlaceHolder = "$BENEFICIARY"
View Source
const BundlerNodeEPAddressPlaceHolder = "$ENTRYPOINT_ADDRESS"
View Source
const BundlerNodeMnemonicPlaceHolder = "$MNEMONIC"
View Source
const BundlerNodeWalletDetails = "bundlerNodeWalletDetails"
View Source
const EthNodePortPlaceHolder = "$ETH_PORT"
View Source
const EthNodeReady = "ethNodeReady"

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerDetails

type ContainerDetails struct {
	ContainerID  string
	IsRunning    bool
	Cmd          []string
	Env          []string
	ExposedPorts nat.PortSet
	NodeType     string
	// contains filtered or unexported fields
}

ContainerDetails contains details of a container

type ContainerManager

type ContainerManager struct {
	EthNodePort          string
	CoinbaseKeystoreFile string
	// contains filtered or unexported fields
}

ContainerManager manages containers

func NewContainerManager

func NewContainerManager() (*ContainerManager, error)

NewContainerManager creates a new container manager

func (*ContainerManager) Close

func (cm *ContainerManager) Close() error

Close closes the Docker client

func (*ContainerManager) IsDockerInstalled

func (cm *ContainerManager) IsDockerInstalled() bool

IsDockerInstalled checks if docker is installed

func (*ContainerManager) ListRunningContainer

func (cm *ContainerManager) ListRunningContainer(ctx context.Context) error

ListAllImages lists all images available in the Docker environment

func (*ContainerManager) PullRequiredImages

func (cm *ContainerManager) PullRequiredImages(ctx context.Context, requiredImages []string) (bool, error)

PullRequiredImages checks if required images are available and pulls them if not

func (*ContainerManager) RunContainerInTheBackground

func (cm *ContainerManager) RunContainerInTheBackground(ctx context.Context, image string, hostPort string) (bool, error)

RunContainerInTheBackground runs a Docker container in the background given its image and host port to bind

func (*ContainerManager) StopAndRemoveRunningContainers

func (cm *ContainerManager) StopAndRemoveRunningContainers(ctx context.Context) (bool, error)

StopAndRemoveRunningContainers stops all running containers that are supported

Jump to

Keyboard shortcuts

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