Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, but bear in mind that layers are what enable differential push/pulls from the Hub or a registry. So you may now want to have separate dependent Dockerfiles - a base for sys deps and app deps squashing it and then an application image deriving from it - probably also squashed.

If you squash a single image I guess you will always push/pull the entire thing even if the system dependencies haven't changed.



Squashing is down up to the `FROM` statement in the Dockerfile. Any layers from the parent image are preserved.

Where this does mess things up is with content-addressable storage where if you have two layers from completely separate images that produced the same content, the layers would be shared, but not if you squash (because there is no layer).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: