test

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerUtils

func DockerUtils() (du *dockerUtils)

DockerUtils is a singleton pattern factory method

Types

type DockerContainer

type DockerContainer struct {
	// contains filtered or unexported fields
}

DockerContainer is used to construct docker container spec for the docker engine.

func (*DockerContainer) AutoRemove

func (c *DockerContainer) AutoRemove(value bool) *DockerContainer

AutoRemove determines whether to automatically remove the container when it has stopped

func (*DockerContainer) EntryPoint

func (c *DockerContainer) EntryPoint(args ...string) *DockerContainer

EntryPoint sets the entrypoint arguments of the container.

func (*DockerContainer) Label

func (c *DockerContainer) Label(label, value string) *DockerContainer

Label adds custom label

func (*DockerContainer) Labels

func (c *DockerContainer) Labels(label map[string]string) *DockerContainer

Labels adds multiple labels

func (*DockerContainer) Name

func (c *DockerContainer) Name(value string) *DockerContainer

Name sets the container name.

func (*DockerContainer) Port

func (c *DockerContainer) Port(external, internal string) *DockerContainer

Port adds a port mapping

func (*DockerContainer) Ports

func (c *DockerContainer) Ports(ports map[string]string) *DockerContainer

Ports adds multiple port mappings

func (*DockerContainer) Run

func (c *DockerContainer) Run() error

Run builds and run command

func (*DockerContainer) Stop

func (c *DockerContainer) Stop() error

Stop and kill container

func (*DockerContainer) Var

func (c *DockerContainer) Var(key, value string) *DockerContainer

Var adds an environment variable

func (*DockerContainer) Vars

func (c *DockerContainer) Vars(vars map[string]string) *DockerContainer

Vars adds multiple environment variables

Jump to

Keyboard shortcuts

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