docker-squash
docker-squash copied to clipboard
v1.2.1 appears to have introduced a destination path bug
When our CI build squashes with v1.2.0 all works fine. When we update to v1.2.1, docker-squash consistently produces the following error:
2024-09-04 04:19:47,488 squash.py:54 INFO docker-squash version 1.2.1, Docker 20.10.22, API 1.41...
2024-09-04 04:19:47,489 squash.py:96 INFO Using v2 image format
2024-09-04 04:19:47,496 image.py:179 INFO Old image has 37 layers
2024-09-04 04:19:47,496 image.py:211 INFO Checking if squashing is necessary...
2024-09-04 04:19:47,496 image.py:223 INFO Attempting to squash last 19 layers...
2024-09-04 04:19:47,496 image.py:371 INFO Saving image sha256:22e24d09ec86cd1d82aa51144a2968c1b71d701a3c89dff4aa78494001376a97 to /tmp/docker-squash-8g0lt41d/old directory...
/usr/lib64/python3.9/tarfile.py:2239: RuntimeWarning: The default behavior of tarfile extraction has been changed to disallow common exploits (including CVE-2007-4559). By default, absolute/parent paths are disallowed and some mode bits are cleared. See https://access.redhat.com/articles/7004769 for more details.
warnings.warn(
2024-09-04 04:20:10,179 image.py:406 INFO Image saved!
2024-09-04 04:20:10,180 image.py:232 INFO Squashing image 'repository/image-name:latest'...
2024-09-04 04:20:10,181 image.py:749 INFO Starting squashing for /tmp/docker-squash-8g0lt41d/new/squashed/layer.tar...
2024-09-04 04:20:11,806 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/6de5a3cc55bf67a0a9912bb8e8b830d312945fddf669e62fb3fa51b209d644f3/layer.tar'...
2024-09-04 04:20:11,807 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/650281fa92917ce5cc58443055a098ad491e3d7d0873cf6f6417497893eda8e4/layer.tar'...
2024-09-04 04:20:11,852 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/fdfe5f9717b65f1a1fa917364a390e3e2c9cff126d9d21812e1eed0d616dc31d/layer.tar'...
2024-09-04 04:20:11,916 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/2d542cc66a9ce04cb5c3cee12c9906e6e6543c6effe0d92c63bdd0652ceb0d9b/layer.tar'...
2024-09-04 04:20:11,918 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/b50ec3f8cadd012be4a54dd2046ffd81ab043097f72f7e80951cca6a06b2bd11/layer.tar'...
2024-09-04 04:20:11,921 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/7bb9a0215c5d110cb703651916f655c3b5a3d5bae9c8fa24250f110aa934274f/layer.tar'...
2024-09-04 04:20:11,924 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/49877f5b395a0f14f45d7731b9baea92bcaf178cba8b2f028d389e051b458f2a/layer.tar'...
2024-09-04 04:20:12,280 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/ca9ef9fe254730e2c5d7dd71bb0bd77590702db2dd9ff1c607b9a9206b0e429f/layer.tar'...
2024-09-04 04:20:12,281 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/3ccfad99e583270b9138adb6f283e106234c50530335a0db3fe0f20bad7d04e6/layer.tar'...
2024-09-04 04:20:12,287 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/de5196ec3a9b895974e9ee0bd55c55f632e53dfa5697e5c74092826e85c8bf66/layer.tar'...
2024-09-04 04:20:12,507 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/4ebcb9421dccd2b9f1e7f3d3fd320fef88b46ae9ee2fc0e83b7c2b1d8ef52290/layer.tar'...
2024-09-04 04:20:12,511 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/f8f29280761153e60c3687610045be2c25bb5bab69621551b49ebf82ad265cec/layer.tar'...
2024-09-04 04:20:12,579 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/fa7e760796c7d0374914924c0d8a2ccf82ea80f01952e9bbcc966ce8f2a5d26c/layer.tar'...
2024-09-04 04:20:12,811 image.py:774 INFO Squashing file '/tmp/docker-squash-8g0lt41d/old/6f0f8d4f29d24f50d9ec225271a327d8bde27662657e4a3876b817c129c79305/layer.tar'...
2024-09-04 04:20:16,933 image.py:922 INFO Squashing finished!
2024-09-04 04:20:18,351 cli.py:142 ERROR Destination path '/tmp/docker-squash-8g0lt41d/new/layer.tar' already exists
2024-09-04 04:20:18,352 cli.py:144 ERROR Execution failed, consult logs above. If you think this is our fault, please file an issue: https://github.com/goldmann/docker-squash/issues, thanks!
For now I've fixed our CI build on 1.2.0 but obviously would prefer to be on the latest and greatest :-) Any suggestions of things to try (or a v1.2.2 release :grin:) most appreciated..
Thanks in advance, Steve.