mirror of
https://github.com/moby/buildkit.git
synced 2026-08-08 00:30:45 +00:00
chore: update getTaskOpts to return multiple opts
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@@ -179,8 +179,7 @@ func (w *containerdExecutor) Run(ctx context.Context, id string, root executor.M
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
task, err := container.NewTask(ctx, cio.NewCreator(cioOpts...), taskOpts)
|
||||
task, err := container.NewTask(ctx, cio.NewCreator(cioOpts...), taskOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ func (w *containerdExecutor) createOCISpec(ctx context.Context, id, resolvConf,
|
||||
return spec, releaseAll, nil
|
||||
}
|
||||
|
||||
func (d *containerState) getTaskOpts() (containerd.NewTaskOpts, error) {
|
||||
func (d *containerState) getTaskOpts() ([]containerd.NewTaskOpts, error) {
|
||||
rootfs := containerd.WithRootFS([]mount.Mount{{
|
||||
Source: d.rootfsPath,
|
||||
Type: "bind",
|
||||
@@ -174,7 +174,7 @@ func (d *containerState) getTaskOpts() (containerd.NewTaskOpts, error) {
|
||||
Options: []string{},
|
||||
}})
|
||||
}
|
||||
return rootfs, nil
|
||||
return []containerd.NewTaskOpts{rootfs}, nil
|
||||
}
|
||||
|
||||
func setArgs(spec *specs.Process, args []string) {
|
||||
|
||||
@@ -96,8 +96,8 @@ func (w *containerdExecutor) createOCISpec(ctx context.Context, id, resolvConf,
|
||||
return spec, releaseAll, nil
|
||||
}
|
||||
|
||||
func (d *containerState) getTaskOpts() (containerd.NewTaskOpts, error) {
|
||||
return containerd.WithRootFS(d.rootMounts), nil
|
||||
func (d *containerState) getTaskOpts() ([]containerd.NewTaskOpts, error) {
|
||||
return []containerd.NewTaskOpts{containerd.WithRootFS(d.rootMounts)}, nil
|
||||
}
|
||||
|
||||
func setArgs(spec *specs.Process, args []string) {
|
||||
|
||||
Reference in New Issue
Block a user