mirror of
https://github.com/moby/buildkit.git
synced 2026-08-05 15:20:22 +00:00
Use oci.With helpers
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
@@ -101,11 +101,11 @@ func GenerateSpec(ctx context.Context, meta executor.Meta, mounts []executor.Mou
|
||||
}
|
||||
|
||||
if meta.SecurityMode == pb.SecurityMode_INSECURE {
|
||||
//make sysfs rw mount for insecure mode.
|
||||
for i, m := range s.Mounts {
|
||||
if m.Destination == "/sys/fs/cgroup" {
|
||||
s.Mounts[i].Options = []string{"nosuid", "noexec", "nodev", "rw"}
|
||||
}
|
||||
if err = oci.WithWriteableCgroupfs(ctx, nil, c, s); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if err = oci.WithWriteableSysfs(ctx, nil, c, s); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user