Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Docker images size #100

Closed
rodcloutier opened this issue Nov 6, 2020 · 1 comment
Closed

Reduce Docker images size #100

rodcloutier opened this issue Nov 6, 2020 · 1 comment
Assignees
Labels
kind/enhancement Improvements or new features resolution/wont-fix This issue won't be fixed

Comments

@rodcloutier
Copy link

rodcloutier commented Nov 6, 2020

Problem description

The image size is quite big (3GB) which seems to come from the full pulumi/pulumi image.

Related to pulumi/pulumi#5703 (EDIT: that issue was moved here as #116)

$ docker images ls | grep pulumi
pulumi/pulumi-kubernetes-operator                            latest                                     d09dbaf383df        5 weeks ago         3.13GB
pulumi/pulumi                                                v2.10.0                                    a4a83d9683e9        8 weeks ago         3.04GB
$ docker history pulumi/pulumi-kubernetes-operator                    
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
d09dbaf383df        5 weeks ago         /bin/sh -c #(nop)  LABEL org.label-schema.vc…   0B                  
<missing>           5 weeks ago         /bin/sh -c #(nop)  LABEL org.label-schema.vc…   0B                  
<missing>           5 weeks ago         /bin/sh -c #(nop)  LABEL org.label-schema.na…   0B                  
<missing>           5 weeks ago         /bin/sh -c #(nop)  LABEL org.label-schema.bu…   0B                  
<missing>           5 weeks ago         /bin/sh -c #(nop)  ENTRYPOINT ["/usr/local/b…   0B                  
<missing>           5 weeks ago         /bin/sh -c #(nop)  USER pulumi-kubernetes-op…   0B                  
<missing>           5 weeks ago         /bin/sh -c mkdir -p /home/pulumi-kubernetes-…   0B                  
<missing>           5 weeks ago         /bin/sh -c useradd -m pulumi-kubernetes-oper…   335kB               
<missing>           5 weeks ago         /bin/sh -c /usr/local/bin/user_setup            1.37kB              
<missing>           5 weeks ago         /bin/sh -c #(nop) COPY multi:7c113d77a7d895a…   478B                
<missing>           5 weeks ago         /bin/sh -c #(nop) COPY file:265f1ac90b349257…   86.5MB              
<missing>           5 weeks ago         /bin/sh -c #(nop)  ENV OPERATOR=/usr/local/b…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENTRYPOINT ["pulumi"]        0B                  
<missing>           8 weeks ago         |1 PULUMI_VERSION=v2.10.0 /bin/sh -c if [ "$…   169MB               
<missing>           8 weeks ago         /bin/sh -c #(nop)  ARG PULUMI_VERSION=latest    0B                  
<missing>           8 weeks ago         /bin/sh -c curl -L https://raw.githubusercon…   48.4MB              
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV XDG_CACHE_HOME=/root/…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV XDG_CONFIG_HOME=/root…   0B                  
<missing>           8 weeks ago         /bin/sh -c wget -q https://packages.microsof…   341MB               
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV PATH=/go/bin:/usr/loc…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV GOPATH=/go               0B                  
<missing>           8 weeks ago         /bin/sh -c curl -fsSLo /tmp/go.tgz https://g…   328MB               
<missing>           8 weeks ago         /bin/sh -c apt-get update -y &&   apt-get in…   2.06GB              
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV GOLANG_SHA256=8a4cbc9…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV GOLANG_VERSION=1.13.10   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  LABEL maintainer=Pulumi T…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  LABEL homepage=https://pu…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  LABEL repository=https://…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  CMD ["python3"]              0B                  
<missing>           8 weeks ago         /bin/sh -c set -ex;   savedAptMark="$(apt-ma…   8.44MB              
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV PYTHON_GET_PIP_SHA256…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV PYTHON_GET_PIP_URL=ht…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV PYTHON_PIP_VERSION=20…   0B                  
<missing>           8 weeks ago         /bin/sh -c cd /usr/local/bin  && ln -s idle3…   32B                 
<missing>           8 weeks ago         /bin/sh -c set -ex   && savedAptMark="$(apt-…   26.7MB              
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV PYTHON_VERSION=3.7.9     0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV GPG_KEY=0D96DF4D4110E…   0B                  
<missing>           8 weeks ago         /bin/sh -c apt-get update && apt-get install…   6.4MB               
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  ENV PATH=/usr/local/bin:/…   0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop)  CMD ["bash"]                 0B                  
<missing>           8 weeks ago         /bin/sh -c #(nop) ADD file:83fbd2352bbac612c…   55.3MB  
@infin8x infin8x added kind/enhancement Improvements or new features and removed enhancement labels Jul 10, 2021
@squaremo squaremo added the resolution/wont-fix This issue won't be fixed label Aug 23, 2022
@squaremo
Copy link
Contributor

The pulumi/pulumi image includes all the things needed to run Pulumi programs. Since we don't know requirements ahead of time, it must include e.g., the Java runtime, Go compiler, etc. It's a large image, for certain. But it's difficult to see how it can be otherwise.

There are mitigations, but I would expect none are perfect and many would be worse overall. For example: if the operator were able to use a specialised image per language (https://www.pulumi.com/blog/introducing-new-docker-images/), each of those images could be somewhat smaller -- however, from a cold start, each would necessitate its own download; and, it would be difficult to realise benefits from caching, like plugin downloads, because they would not persist.

I'm going to close this as wontfix, to take it off the radar. It may yet be addressed, in the course of other work like #78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/wont-fix This issue won't be fixed
Projects
None yet
Development

No branches or pull requests

5 participants