dockerfile: do not add linked and cache paths to context sources

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-19.03
Tonis Tiigi 2019-07-11 17:11:59 -07:00
parent db487c0cd0
commit 0cd68f6491
1 changed files with 3 additions and 1 deletions

View File

@ -144,7 +144,9 @@ func dispatchRunMounts(d *dispatchState, c *instructions.RunCommand, sources []*
out = append(out, llb.AddMount(target, st, mountOpts...))
d.ctxPaths[path.Join("/", filepath.ToSlash(mount.Source))] = struct{}{}
if mount.From == "" {
d.ctxPaths[path.Join("/", filepath.ToSlash(mount.Source))] = struct{}{}
}
}
return out, nil
}