Documentation
¶
Index ¶
- func DockerUtils() (du *dockerUtils)
- type DockerContainer
- func (c *DockerContainer) AutoRemove(value bool) *DockerContainer
- func (c *DockerContainer) EntryPoint(args ...string) *DockerContainer
- func (c *DockerContainer) Label(label, value string) *DockerContainer
- func (c *DockerContainer) Labels(label map[string]string) *DockerContainer
- func (c *DockerContainer) Name(value string) *DockerContainer
- func (c *DockerContainer) Port(external, internal string) *DockerContainer
- func (c *DockerContainer) Ports(ports map[string]string) *DockerContainer
- func (c *DockerContainer) Run() error
- func (c *DockerContainer) Stop() error
- func (c *DockerContainer) Var(key, value string) *DockerContainer
- func (c *DockerContainer) Vars(vars map[string]string) *DockerContainer
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) 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
Click to show internal directories.
Click to hide internal directories.