Merge pull request #18538 from estesp/aufs-whiteout-userns-fix
Skip aufs whiteout files on userns translation to container
This commit is contained in:
commit
f576cf770a
1 changed files with 3 additions and 2 deletions
|
@ -304,8 +304,9 @@ func (ta *tarAppender) addTarFile(path, name string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle re-mapping container ID mappings back to host ID mappings before
|
//handle re-mapping container ID mappings back to host ID mappings before
|
||||||
//writing tar headers/files
|
//writing tar headers/files. We skip whiteout files because they were written
|
||||||
if ta.UIDMaps != nil || ta.GIDMaps != nil {
|
//by the kernel and already have proper ownership relative to the host
|
||||||
|
if !strings.HasPrefix(filepath.Base(hdr.Name), WhiteoutPrefix) && (ta.UIDMaps != nil || ta.GIDMaps != nil) {
|
||||||
uid, gid, err := getFileUIDGID(fi.Sys())
|
uid, gid, err := getFileUIDGID(fi.Sys())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue