diff --git a/solver/llbsolver/ops/exec.go b/solver/llbsolver/ops/exec.go index 24aa46aa..73666c5a 100644 --- a/solver/llbsolver/ops/exec.go +++ b/solver/llbsolver/ops/exec.go @@ -69,8 +69,8 @@ func cloneExecOp(old *pb.ExecOp) pb.ExecOp { } n.Meta = &meta n.Mounts = nil - for i := range n.Mounts { - m := *n.Mounts[i] + for i := range old.Mounts { + m := *old.Mounts[i] n.Mounts = append(n.Mounts, &m) } return n