Replies: 2 comments
-
The main difference is that my script is a simple shell script, while the project you mentioned requires Python. My lightweight script can run on any Linux system (or macOS) with Docker installed, without other dependencies. It merges the layers of a Docker image into a single layer while preserving metadata from the original image. Its strength lies in retaining instructions from the source image when merging layers. In contrast, the goldmann/docker-squash project handles decompressing and repacking layers into new ones. It loses the original instructions (like ENV, USER, etc) defined in the source image's layers. Let’s look at their examples, their result image lacks the EXPOSE and last CMD instruction from the source. This could prevent the main program in the container from starting properly. Thank you for bringing up this comparison. It helps me better grasp the advantages and disadvantages of each approach. Let me know if this revised version communicates the differences more clearly. I'm happy to clarify or expand on any part. Best regards |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response!
I think the examples/docs must be inaccurate; this definitely works as it should. (A large number of red hat's containers are run through that tool prior to shipping) |
Beta Was this translation helpful? Give feedback.
-
The existing, older project named docker squash is https://github.com/goldmann/docker-squash
how does your project compare?
Beta Was this translation helpful? Give feedback.
All reactions