docker

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package docker provides an interface to work with Docker containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(r runners.Runner, c *resources.AppConfig, cmd string) (string, error)

Exec executes command on specified container.

func GetLogs

func GetLogs(r runners.Runner, c *resources.AppConfig, sinceRelMins uint) (string, error)

GetLogs gets logs from specified container.

func ImageExists

func ImageExists(r runners.Runner, dockerImage string) (bool, error)

ImageExists checks existence of Docker image.

func IsContainerRunning

func IsContainerRunning(ctx context.Context, docker *client.Client, containerName string) (bool, error)

IsContainerRunning checks if specified container is running.

func ListContainers

func ListContainers(r runners.Runner, clonePool string) ([]string, error)

ListContainers lists container names.

func PrepareImage

func PrepareImage(runner runners.Runner, dockerImage string) error

PrepareImage prepares a Docker image to use.

func PullImage

func PullImage(r runners.Runner, dockerImage string) error

PullImage pulls Docker image from DockerHub registry.

func RemoveContainer

func RemoveContainer(r runners.Runner, cloneName string) (string, error)

RemoveContainer removes specified container.

func RunContainer

func RunContainer(r runners.Runner, c *resources.AppConfig) error

RunContainer runs specified container.

func StopContainer

func StopContainer(r runners.Runner, c *resources.AppConfig) (string, error)

StopContainer stops specified container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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