-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove leading slash in layer tarball paths (Closes: #726) #729
Remove leading slash in layer tarball paths (Closes: #726) #729
Conversation
@xanonid thank you for the PR and sorry for delay.
Let me know if you need more help in figuring these failures. |
319e534
to
30db2c0
Compare
@tejal29 After rebasing and with my latest commit, which remove also the leadings slash from whiteout file paths, the integration test seems to run now fine. Could you, please, trigger kokoro again? PS: To get it really running (local docker version 18.09.7), I needed to apply following change (the corresponding error message is mentioned in #368 ): diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go
index 4abfcd4..be9ef7b 100644
--- a/pkg/util/fs_util.go
+++ b/pkg/util/fs_util.go
@@ -99,6 +99,11 @@ func GetFSFromImage(root string, img v1.Image) ([]string, error) {
path := filepath.Join(root, filepath.Clean(hdr.Name))
base := filepath.Base(path)
dir := filepath.Dir(path)
+ if base == ".wh..wh..opq" {
+ // FIXME: skip to prevent error in next step
+ continue
+ }
+
if strings.HasPrefix(base, ".wh.") {
logrus.Debugf("Whiting out %s", path)
name := strings.TrimPrefix(base, ".wh." |
This PR removes leading slashes in the path of files in the layer.tar tarballs. This is necessary to be more compatible with docker and some security scanners.
Closes: #726