Documentation ¶
Index ¶
- Constants
- Variables
- func CreateStepContainer(ctx context.Context, state *pipeline.State, client *docker.Client, ...) (*docker.Container, error)
- func DefaultMounts(v *docker.Volume) ([]docker.HostMount, error)
- func MountAt(v *docker.Volume, target string, mode int) docker.HostMount
- func RunContainer(ctx context.Context, client *docker.Client, opts RunOpts) error
- type Client
- type CreateStepContainerOpts
- type RunOpts
Constants ¶
View Source
const (
ScribeContainerPath = "/var/scribe"
)
Variables ¶
View Source
var KnownVolumes = map[pipeline.Argument]func(*pipeline.State) (docker.HostMount, error){ pipeline.ArgumentSourceFS: func(state *pipeline.State) (docker.HostMount, error) { source := state.MustGetDirectoryString(pipeline.ArgumentSourceFS) sourceAbs, err := filepath.Abs(source) if err != nil { return docker.HostMount{}, err } return docker.HostMount{ Type: "bind", Source: sourceAbs, Target: ScribeContainerPath, }, nil }, pipeline.ArgumentDockerSocketFS: func(state *pipeline.State) (docker.HostMount, error) { return docker.HostMount{ Type: "bind", Source: "/var/run/docker.sock", Target: "/var/run/docker.sock", }, nil }, }
KnownVolumes are pre-defined filesystem arguments that need to be mounted in the container in order to have value. Most filesystem arguments are packaged and placed into the state directory for other steps to use. These, however, exist on the host and must be explicitely mounted using a "bind" mount.
Functions ¶
func CreateStepContainer ¶
Types ¶
type Client ¶
The Client is used when interacting with a scribe pipeline using the scribe CLI. In order to emulate what happens in a remote environment, the steps are put into a queue before being ran. Each step is ran in its own docker container.
type CreateStepContainerOpts ¶
Click to show internal directories.
Click to hide internal directories.