Makisu generated image is double the size of docker build
gschnaubelt opened this issue · 2 comments
gschnaubelt commented
Describe the bug
- Used
makisu_build
anddocker build
on the sameDockerfile
- Used
docker inspect
and see that the makisu image is about double the size
To Reproduce
Steps to reproduce the behavior:
$ cat Dockerfile
FROM openjdk:11-jdk-slim
RUN apt-get update && apt-get install -y netcat curl && rm -rf /var/lib/apt/lists/*
$ docker build -t java11-test-docker.build .
$ makisu_build -t java11-test-makisu.build .
$ docker inspect java11-test-docker.build | grep -i size
"Size": 406372276,
"VirtualSize": 406372276,
$ docker inspect java11-test-makisu.build | grep -i size
"Size": 807171944,
"VirtualSize": 807171944,
Expected behavior
I expected the images to be very close in size or the makisu generated image to be smaller
Environments
$ type makisu_build
makisu_build is a function
makisu_build ()
{
makisu_version=${MAKISU_VERSION:-v0.1.11};
cd ${@: -1};
docker run -i --rm --net host -v /var/run/docker.sock:/docker.sock -e DOCKER_HOST=unix:///docker.sock -v $(pwd):/makisu-context -v /tmp/makisu-storage:/makisu-storage gcr.io/makisu-project/makisu:$makisu_version build --commit=explicit --modifyfs=true --load ${@:1:${#@}-1} /makisu-context;
cd -
}
$ docker --version
Docker version 19.03.4, build 9013bf5
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G103
Additional context
Add any other context about the problem here--environment configurations, logs, etc.
yiranwang52 commented
This might be similar to #243 , caused by our lazy approach to hard links.
kenotsolutions commented
I have the same problem and it impacts pods' initials time.
same docker file size 127.25MB with docker build with makisu 217.84MB
Even if I use --compression=size it does not affect from default.