mirror of https://github.com/docker/docs.git
Merge pull request #8813 from jlhawn/aufs_exclude_on_tar_layer
Exclude `.wh..wh.*` AUFS metadata on layer export
This commit is contained in:
commit
6718791ea2
|
@ -300,6 +300,7 @@ func (a *Driver) Diff(id, parent string) (archive.Archive, error) {
|
||||||
// AUFS doesn't need the parent layer to produce a diff.
|
// AUFS doesn't need the parent layer to produce a diff.
|
||||||
return archive.TarWithOptions(path.Join(a.rootPath(), "diff", id), &archive.TarOptions{
|
return archive.TarWithOptions(path.Join(a.rootPath(), "diff", id), &archive.TarOptions{
|
||||||
Compression: archive.Uncompressed,
|
Compression: archive.Uncompressed,
|
||||||
|
Excludes: []string{".wh..wh.*"},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,7 +397,9 @@ func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
relFilePath, err := filepath.Rel(srcPath, filePath)
|
relFilePath, err := filepath.Rel(srcPath, filePath)
|
||||||
if err != nil {
|
if err != nil || (relFilePath == "." && f.IsDir()) {
|
||||||
|
// Error getting relative path OR we are looking
|
||||||
|
// at the root path. Skip in both situations.
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue