contenthash: use selector for content path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>docker-18.09
parent
aa43fb553e
commit
eb7b5bb76a
|
@ -3,6 +3,7 @@ package solver
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"path"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -142,7 +143,7 @@ func (e *execOp) ContentKeys(ctx context.Context, inputs [][]digest.Digest, refs
|
||||||
for _, m := range e.op.Mounts {
|
for _, m := range e.op.Mounts {
|
||||||
if m.Input != pb.Empty {
|
if m.Input != pb.Empty {
|
||||||
if m.Dest != pb.RootMount {
|
if m.Dest != pb.RootMount {
|
||||||
srcs[int(m.Input)] = "/" // TODO: selector
|
srcs[int(m.Input)] = path.Join("/", m.Selector)
|
||||||
skip = false
|
skip = false
|
||||||
} else {
|
} else {
|
||||||
rootIndex = int(m.Input)
|
rootIndex = int(m.Input)
|
||||||
|
|
Loading…
Reference in New Issue