kaniko/pkg/snapshot
Andreas Fleig bc46c24707
Write parent directories to tar before whiteout files (#2113)
* Write parent directories to tar before whiteout files

Fixes #1149

The OCI image spec does not specify this order but it's a good idea and Docker
does the same.

When manually comparing layers created by Docker and Kaniko there are still
some differences (that container-diff does not show):

* Kaniko adds / to layers
* For `mkdir /test`, docker adds `/test` and an opaque whiteout file
  `/test/.wh..wh..opq`. Kaniko only adds `/test/` (and /).

* snapshot_test: cleanup

Fix typos and use listFilesInTar() where possible
2022-05-31 16:42:32 -04:00
..
layered_map.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
layered_map_test.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
snapshot.go Write parent directories to tar before whiteout files (#2113) 2022-05-31 16:42:32 -04:00
snapshot_test.go Write parent directories to tar before whiteout files (#2113) 2022-05-31 16:42:32 -04:00