-
Notifications
You must be signed in to change notification settings - Fork 155
With some special base images, image size drastically larger than when built using docker #243
Comments
Thanks for the analysis. We found this issue in our environment recently as well, and fixed that in #239. We will create a new release soon. |
I built master (v0.1.11-10-g1b1102a) and re-ran. Image size is better as the resulting size is only 1.06G now (vs 1.54G before). However docker build still results in a 811M file. The image layers still show as indicated above. No difference. |
Did you set commit=explicit? if you did, then it's expected you get less layers, see https://github.com/uber/makisu#explicit-commit-and-cache About the size, I need a little time to debug. |
Here is some more info makisu image:
docker image:
|
Interesting is the first layer listed there, in the Dockerfile that simply removes a file and sets a symlink. Docker reports that as a 31B layer whereas makisu matches the previous layer and makes a 111Mb layer. In addition the curl commands that are used to install terragrunt seem off in the makisu version. First one is 294M. While the second layer is only 9B. |
I think it's caused by changes we made to https://github.com/uber/makisu/blob/master/lib/tario/compare.go |
I did more experiments, and found out this only happens for some special base images like The reason is - makisu includes all files that's considered different from previous layers into current layer. Because these base image layer tars somehow has these files as of Regardless, this is still a minor bug we should fix. |
I think there is also a size problem with hardlink. |
New to makisu and built my first image. After successful build I find that the image is (as reported by docker images) 1.49G. That same image built with docker results in an image size of 811M.
Inspecting the resulting image and comparing that to the one that docker build produces shows different layers (both in hash and number).
Inspect of makisu image
Inspect of docker image
From the looks of it the the first 7 layers are common (and are actually from the base image runatlantis/atlantis:v0.8.2). In makisu it appears that all of the layers generated from my Dockerfile are squashed into one (which would make caching difficult no?) whereas in the docker build version they are not.
The text was updated successfully, but these errors were encountered: