Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { *resource.Status Name string Image string Entrypoint []string Command []string WorkingDir string Env []string Expose []string Links []string PortBindings []string DNS []string Volumes []string VolumesFrom []string PublishAllPorts bool CStatus string Force bool // contains filtered or unexported fields }
Container is responsible for creating docker containers
func (*Container) Apply ¶
func (c *Container) Apply() (resource.TaskStatus, error)
Apply starts a docker container with the specified configuration
type Preparer ¶
type Preparer struct { // name of the container Name string `hcl:"name" required:"true"` // the image name or ID to use for the container Image string `hcl:"image" required:"true"` // override the container entrypoint Entrypoint []string `hcl:"entrypoint"` // override the container command Command []string `hcl:"command"` // override the working directory of the container WorkingDir string `hcl:"working_dir"` // set environment variables in the container Env map[string]string `hcl:"env"` // additional ports to expose in the container Expose []string `hcl:"expose"` // A list of links for the container. Each link entry should be in the form of // container_name:alias Links []string `hcl:"links"` // publish container ports to the host. Each item should be in the following // format: // ip:hostPort:containerPort|ip::containerPort|hostPort:containerPort|containerPort. // Ports can be specified in the format: portnum/proto. If proto is not // specified, "tcp" is assumed Ports []string `hcl:"ports"` // list of DNS servers for the container to use DNS []string `hcl:"dns"` // bind mounts volumes Volumes []string `hcl:"volumes"` // mounts all volumes from the specified container VolumesFrom []string `hcl:"volumes_from"` // allocates a random host port for all of a container’s exposed ports. // Specified as a boolean value PublishAllPorts bool `hcl:"publish_all_ports"` // the desired status of the container. Status string `hcl:"status" valid_values:"running,created"` // indicates whether or not the container will be recreated if the state is // not what is expected. By default, the module will only check to see if the // container exists. Specified as a boolean value Force bool `hcl:"force"` }
Preparer for docker containers
Container is responsible for creating docker containers. It assumes that there is already a Docker daemon running on the system.
Click to show internal directories.
Click to hide internal directories.