core: replaced persistent cache mounts with directory
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
b41adbd9c2
commit
09617b89da
@ -456,11 +456,16 @@ func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value)
|
|||||||
case "cache":
|
case "cache":
|
||||||
return llb.AddMount(
|
return llb.AddMount(
|
||||||
dest,
|
dest,
|
||||||
llb.Scratch(),
|
llb.Scratch().File(
|
||||||
llb.AsPersistentCacheDir(
|
llb.Mkdir("/cache", fs.FileMode(0755)),
|
||||||
p.canonicalPath(mnt),
|
llb.WithCustomName(p.vertexNamef("Mkdir /cache (cache mount %s)", dest)),
|
||||||
llb.CacheMountShared,
|
|
||||||
),
|
),
|
||||||
|
// FIXME: disabled persistent cache mount (gh issue #495)
|
||||||
|
// llb.Scratch(),
|
||||||
|
// llb.AsPersistentCacheDir(
|
||||||
|
// p.canonicalPath(mnt),
|
||||||
|
// llb.CacheMountShared,
|
||||||
|
// ),
|
||||||
), nil
|
), nil
|
||||||
case "tmpfs":
|
case "tmpfs":
|
||||||
return llb.AddMount(
|
return llb.AddMount(
|
||||||
|
Reference in New Issue
Block a user