Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Makisu generated image is double the size of docker build #285

Open
gschnaubelt opened this issue Oct 24, 2019 · 2 comments
Open

Makisu generated image is double the size of docker build #285

gschnaubelt opened this issue Oct 24, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@gschnaubelt
Copy link

Describe the bug

  1. Used makisu_build and docker build on the same Dockerfile
  2. 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
Copy link
Contributor

This might be similar to #243 , caused by our lazy approach to hard links.

@yiranwang52 yiranwang52 added the bug Something isn't working label Oct 28, 2019
@kenotsolutions
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants