Implement options for runtime specific settings
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -121,7 +121,10 @@ func (s *Service) Create(ctx context.Context, r *api.CreateTaskRequest) (*api.Cr
|
||||
if err != nil {
|
||||
return nil, errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
var options []byte
|
||||
if r.Options != nil {
|
||||
options = r.Options.Value
|
||||
}
|
||||
opts := runtime.CreateOpts{
|
||||
Spec: container.Spec,
|
||||
IO: runtime.IO{
|
||||
@@ -131,6 +134,7 @@ func (s *Service) Create(ctx context.Context, r *api.CreateTaskRequest) (*api.Cr
|
||||
Terminal: r.Terminal,
|
||||
},
|
||||
Checkpoint: checkpointPath,
|
||||
Options: options,
|
||||
}
|
||||
for _, m := range r.Rootfs {
|
||||
opts.Rootfs = append(opts.Rootfs, mount.Mount{
|
||||
@@ -414,7 +418,11 @@ func (s *Service) Checkpoint(ctx context.Context, r *api.CheckpointTaskRequest)
|
||||
return nil, err
|
||||
}
|
||||
defer os.RemoveAll(image)
|
||||
if err := t.Checkpoint(ctx, image, r.Options); err != nil {
|
||||
var options []byte
|
||||
if r.Options != nil {
|
||||
options = r.Options.Value
|
||||
}
|
||||
if err := t.Checkpoint(ctx, image, options); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// write checkpoint to the content store
|
||||
|
||||
Reference in New Issue
Block a user