Documentation
¶
Overview ¶
Package docker provides Docker and docker-compose integration utilities.
Index ¶
- func BuildDockerImage(host *models.Host, image string, path string, dockerfile string) error
- func BuildDockerImageFromGitRepo(host *models.Host, image string, gitRepo string, commit string) error
- func ComposeOverSSH(composeDesc string, host *models.Host, timeout time.Duration, ...) error
- func ComposeSSHSetupLoadTest(host *models.Host) error
- func ComposeSSHSetupMonitoring(host *models.Host) error
- func ComposeSSHSetupNode(host *models.Host, network models.Network, luxdVersion string, ...) error
- func ComposeSSHSetupWarpRelayer(host *models.Host, relayerVersion string) error
- func GetRemoteComposeContent(host *models.Host, composeFile string, timeout time.Duration) (string, error)
- func HasRemoteComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) (bool, error)
- func InitDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
- func ListRemoteComposeServices(host *models.Host, composeFile string, timeout time.Duration) ([]string, error)
- func LocalImageExists(host *models.Host, image string) (bool, error)
- func ParseRemoteComposeContent(host *models.Host, composeFile string, pattern string, timeout time.Duration) (string, error)
- func PrepareDockerImageWithRepo(host *models.Host, image string, gitRepo string, commit string) error
- func PullDockerImage(host *models.Host, image string) error
- func RestartDockerCompose(host *models.Host, timeout time.Duration) error
- func RestartDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
- func StartDockerCompose(host *models.Host, timeout time.Duration) error
- func StartDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
- func StopDockerCompose(host *models.Host, timeout time.Duration) error
- func StopDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
- func ValidateComposeFile(host *models.Host, composeFile string, timeout time.Duration) error
- func WasNodeSetupWithMonitoring(host *models.Host) (bool, error)
- type ComposeInputs
- type LuxdConfigOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDockerImage ¶
BuildDockerImage builds a docker image on a remote host.
func BuildDockerImageFromGitRepo ¶
func BuildDockerImageFromGitRepo(host *models.Host, image string, gitRepo string, commit string) error
BuildDockerImageFromGitRepo builds a docker image from a git repo on a remote host.
func ComposeOverSSH ¶
func ComposeOverSSH( composeDesc string, host *models.Host, timeout time.Duration, composePath string, composeVars ComposeInputs, ) error
ComposeOverSSH sets up a docker-compose file on a remote host over SSH.
func ComposeSSHSetupLoadTest ¶
ComposeSSHSetupLoadTest sets up load test environment using docker-compose.
func ComposeSSHSetupMonitoring ¶
ComposeSSHSetupMonitoring sets up monitoring using docker-compose.
func ComposeSSHSetupNode ¶
func ComposeSSHSetupNode( host *models.Host, network models.Network, luxdVersion string, luxdBootstrapIDs []string, luxdBootstrapIPs []string, partialSync bool, luxdGenesisFilePath string, luxdUpgradeFilePath string, withMonitoring bool, publicAccessToHTTPPort bool, ) error
ComposeSSHSetupNode sets up an Luxd node and dependencies on a remote host over SSH.
func ComposeSSHSetupWarpRelayer ¶
ComposeSSHSetupWarpRelayer sets up the AWM warp relayer using docker-compose.
func GetRemoteComposeContent ¶
func GetRemoteComposeContent(host *models.Host, composeFile string, timeout time.Duration) (string, error)
GetRemoteComposeContent gets the content of a remote docker-compose file.
func HasRemoteComposeService ¶
func HasRemoteComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) (bool, error)
HasRemoteComposeService checks if a service is present in a remote docker-compose file.
func InitDockerComposeService ¶
func InitDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
InitDockerComposeService creates a specific service in a docker-compose file on a remote host.
func ListRemoteComposeServices ¶
func ListRemoteComposeServices(host *models.Host, composeFile string, timeout time.Duration) ([]string, error)
ListRemoteComposeServices lists the services in a remote docker-compose file.
func LocalImageExists ¶ added in v1.22.6
LocalImageExists checks if a docker image exists on a remote host.
func ParseRemoteComposeContent ¶
func ParseRemoteComposeContent(host *models.Host, composeFile string, pattern string, timeout time.Duration) (string, error)
ParseRemoteComposeContent extracts a value from a remote docker-compose file.
func PrepareDockerImageWithRepo ¶
func PrepareDockerImageWithRepo(host *models.Host, image string, gitRepo string, commit string) error
PrepareDockerImageWithRepo ensures a docker image is available on the host, pulling or building from the git repo if necessary.
func PullDockerImage ¶
PullDockerImage pulls a docker image on a remote host.
func RestartDockerCompose ¶
RestartDockerCompose restarts all services in the docker-compose file on a remote host.
func RestartDockerComposeService ¶
func RestartDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
RestartDockerComposeService restarts a specific service in a docker-compose file on a remote host.
func StartDockerCompose ¶
StartDockerCompose starts all services in the docker-compose file on a remote host.
func StartDockerComposeService ¶
func StartDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
StartDockerComposeService starts a specific service in a docker-compose file on a remote host.
func StopDockerCompose ¶
StopDockerCompose stops all services in the docker-compose file on a remote host.
func StopDockerComposeService ¶
func StopDockerComposeService(host *models.Host, composeFile string, service string, timeout time.Duration) error
StopDockerComposeService stops a specific service in a docker-compose file on a remote host.
func ValidateComposeFile ¶
ValidateComposeFile validates a docker-compose file on a remote host.