Fix Symlinks not being copies across stages

This commit is contained in:
Tejal Desai
2020-01-22 11:47:10 -08:00
parent 6e80e627ac
commit da7e9928e4
5 changed files with 97 additions and 27 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func (c *CopyCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.Bu
return err
}
c.snapshotFiles = append(c.snapshotFiles, copiedFiles...)
} else if fi.Mode()&os.ModeSymlink != 0 {
} else if util.IsSymlink(fi) {
// If file is a symlink, we want to create the same relative symlink
exclude, err := util.CopySymlink(fullPath, destPath, c.buildcontext)
if err != nil {