Documentation ¶
Index ¶
- func DoesExist(ctx context.Context, name string, image optional.Option[string]) (bool, error)
- func Exec(ctx context.Context, name string, command ...string) error
- func GetContainerPort(ctx context.Context, name string, port int) (int, error)
- func PollContainerHealth(ctx context.Context, containerName string, timeout time.Duration) error
- func Pull(ctx context.Context, imageName string) error
- func Run(ctx context.Context, image, name string, hostPort, containerPort int, ...) error
- func RunDB(ctx context.Context, name string, port int, image string) error
- func Start(ctx context.Context, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
Exec runs a command in the given container, stream to stderr. Return an error if the command fails.
func GetContainerPort ¶
GetContainerPort returns the host TCP port of the given container's exposed port.
func PollContainerHealth ¶
PollContainerHealth polls the given container until it is healthy or the timeout is reached.
func Run ¶
func Run(ctx context.Context, image, name string, hostPort, containerPort int, volume optional.Option[string]) error
Run starts a new detached container with the given image, name, port map, and (optional) volume mount.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.