Documentation ¶
Index ¶
- func BuildImageWithDockerfile(config BuildImageConfig) (string, error)
- func CreateContainer(config CreateContainerConfig) (string, error)
- func Publish(image, username, password string) (string, error)
- func RemoveContainer(id string, force bool) error
- func RestartContainer(identifier string, timeout *time.Duration) error
- func RunCommand(containerID string, commands ...string) (*bufio.Reader, error)
- func StartContainer(id string) error
- func StopContainer(id string, timeout *time.Duration) error
- type BuildImageConfig
- type Container
- type CreateContainerConfig
- type Image
- type ImageConfig
- type Network
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImageWithDockerfile ¶
func BuildImageWithDockerfile(config BuildImageConfig) (string, error)
BuildImageWithDockerfile builds an image using a specific dockerfile
func CreateContainer ¶
func CreateContainer(config CreateContainerConfig) (string, error)
CreateContainer creates a new container on Docker
func RemoveContainer ¶
RemoveContainer by Id the container links and volumes will be removed too
func RestartContainer ¶
RestartContainer by Id or Name
Types ¶
type BuildImageConfig ¶
BuildImageConfig is a basic configuration to build an image
type Container ¶
type Container struct { Name string ID string Image string Volumes []string Env []string Ports []string }
Container is a basic representation of a docker container
func FindContainerByIdentifier ¶
FindContainerByIdentifier finds container by id or name
type CreateContainerConfig ¶
type CreateContainerConfig struct { Name string Image string Volumes []string Env []string Ports []string NetworkName string }
CreateContainerConfig is a basic configuration structure to create a docker container
type ImageConfig ¶
type ImageConfig struct { }
type Network ¶
Network is a basic representation of a docker network
func FindNetworkByName ¶
FindNetworkByName look for a docker network with specific name
Click to show internal directories.
Click to hide internal directories.