Documentation
¶
Index ¶
- func ContainerDBConnection(container *docker.Container, port docker.Port) (*sql.DB, error)
- func CreateNetwork(dockerClient *docker.Client, name string) (*docker.Network, error)
- func FetchContainerFileContents(dockerClient *docker.Client, container *docker.Container, filePath string) (string, error)
- func HostPort(containerPort docker.Port, container *docker.Container) string
- func PullImage(dockerClient *docker.Client, repository string) error
- func RemoveContainer(dockerClient *docker.Client, container *docker.Container) error
- func RemoveNetwork(dockerClient *docker.Client, network *docker.Network) error
- func RunContainer(dockerClient *docker.Client, containerName string, options ...ContainerOption) (*docker.Container, error)
- type ContainerOption
- func AddBinds(binds ...string) ContainerOption
- func AddEnvVars(envVars ...string) ContainerOption
- func AddExposedPorts(ports ...docker.Port) ContainerOption
- func WithCmd(cmd ...string) ContainerOption
- func WithEntrypoint(cmd string) ContainerOption
- func WithImage(imageID string) ContainerOption
- func WithNetwork(network *docker.Network) ContainerOption
- func WithUser(username string) ContainerOption
- type ExecResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerDBConnection ¶
func CreateNetwork ¶
func RemoveContainer ¶
func RunContainer ¶
Types ¶
type ContainerOption ¶
type ContainerOption func(*docker.CreateContainerOptions)
func AddBinds ¶
func AddBinds(binds ...string) ContainerOption
func AddEnvVars ¶
func AddEnvVars(envVars ...string) ContainerOption
func AddExposedPorts ¶
func AddExposedPorts(ports ...docker.Port) ContainerOption
func WithCmd ¶
func WithCmd(cmd ...string) ContainerOption
func WithEntrypoint ¶
func WithEntrypoint(cmd string) ContainerOption
func WithImage ¶
func WithImage(imageID string) ContainerOption
func WithNetwork ¶
func WithNetwork(network *docker.Network) ContainerOption
func WithUser ¶
func WithUser(username string) ContainerOption
type ExecResult ¶
func HardKillMySQL ¶
Click to show internal directories.
Click to hide internal directories.