contenthash: use selector for content path

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-18.09
Tonis Tiigi 2017-08-09 18:19:40 -07:00
parent aa43fb553e
commit eb7b5bb76a
1 changed files with 2 additions and 1 deletions

View File

@ -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)