Documentation
¶
Overview ¶
Package docker is the interface of dunner to communicate with the Docker Engine through methods wrapping over Docker client library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Step ¶
type Step struct {
Task string // The name of the task that the step corresponds to
Name string // Name given to this step for identification purpose
Image string // Image is the repo name on which Docker containers are built
Command []string // The command which runs on the container and exits
Commands [][]string // The list of commands that are to be run in sequence
Env []string // The list of environment variables to be exported inside the container
WorkDir string // The primary directory on which task is to be run
Volumes map[string]string // Volumes that are to be attached to the container
ExtMounts []mount.Mount // The directories to be mounted on the container as bind volumes
Follow string // The next task that must be executed if this does go successfully
Args []string // The list of arguments that are to be passed
}
Step describes the information required to run one task in docker container. It is very similar to the concept of docker build of a 'Dockerfile' and then a sequence of commands to be executed in `docker run`.
func (Step) Exec ¶
Exec method is used to execute the task described in the corresponding step. It returns an object of the struct `Result` with the corresponding output and/or error.
Note: A working internet connection is mandatory for the Docker container to contact Docker Hub to find the image and/or corresponding updates.