Implement options for runtime specific settings

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-23 14:55:10 -07:00
parent eedcbc64cc
commit 82d0208aaa
18 changed files with 1701 additions and 467 deletions

View File

@@ -195,10 +195,13 @@ func WithNewReadonlyRootFS(id string, i Image) NewContainerOpts {
}
}
func WithRuntime(name string) NewContainerOpts {
// WithRuntime allows a user to specify the runtime name and additional options that should
// be used to create tasks for the container
func WithRuntime(name string, options map[string]string) NewContainerOpts {
return func(ctx context.Context, client *Client, c *containers.Container) error {
c.Runtime = &containers.Container_Runtime{
Name: name,
Name: name,
Options: options,
}
return nil
}