Zenika-Training / zenika-formation-framework

Tools to build and present our training material
8 stars 25 forks source link

Fat docker image #232

Open zigarn opened 6 years ago

zigarn commented 6 years ago
$ docker image ls zenika/formation-framework
zenika/formation-framework   v3                  3d6ab972a145        2 months ago         1.3GB
zenika/formation-framework   v2.6.0              791a1bc86096        7 months ago        836MB

$ docker history zenika/formation-framework:v2.6.0 
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
791a1bc86096        7 months ago        /bin/sh -c #(nop)  CMD ["grunt"]                0B                  
<missing>           7 months ago        /bin/sh -c #(nop) WORKDIR /data                 0B                  
<missing>           7 months ago        /bin/sh -c #(nop)  EXPOSE 32729/tcp 8000/tcp    0B                  
<missing>           7 months ago        /bin/sh -c #(nop) COPY dir:c0efb4f3f9f03b12a…   3.48MB              
<missing>           7 months ago        /bin/sh -c npm install --quiet                  161MB               
<missing>           7 months ago        /bin/sh -c #(nop) COPY multi:75651fd73ff03fa…   3.15kB              
<missing>           7 months ago        /bin/sh -c #(nop) WORKDIR /data/node_modules…   0B                  
<missing>           7 months ago        /bin/sh -c npm install --quiet grunt@^0.4.5 …   10.9MB           
<missing>           7 months ago        /bin/sh -c #(nop) WORKDIR /data                 0B                  
<missing>           7 months ago        /bin/sh -c #(nop)  MAINTAINER Zenika <http:/…   0B
[...]

$ docker history zenika/formation-framework:v3
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
3d6ab972a145        2 months ago        /bin/sh -c #(nop)  CMD ["grunt"]                0B                  
<missing>           2 months ago        /bin/sh -c #(nop) WORKDIR /data                 0B                  
<missing>           2 months ago        /bin/sh -c #(nop)  EXPOSE 32729/tcp 8000/tcp    0B                  
<missing>           2 months ago        /bin/sh -c #(nop) COPY dir:3ec416f576c8f5ace…   5.42MB              
<missing>           2 months ago        /bin/sh -c npm install --quiet                  401MB               
<missing>           2 months ago        /bin/sh -c #(nop) COPY multi:dd44de62d3e13b9…   3.47kB              
<missing>           2 months ago        /bin/sh -c #(nop) WORKDIR /data/node_modules…   0B                  
<missing>           2 months ago        /bin/sh -c npm install --quiet grunt@^0.4.5 …   9.65MB              
<missing>           2 months ago        /bin/sh -c #(nop) WORKDIR /data                 0B                  
<missing>           2 months ago        /bin/sh -c apt-get update &&     apt-get ins…   209MB               
<missing>           2 months ago        /bin/sh -c #(nop)  MAINTAINER Zenika <http:/…   0B
[...]

+210MB with the apt install (can be improved by 100MB by cleaning /var/lib/apt/lists) +240MB with of npm modules.

(My disappointment with node/npm is stronger from day to day)

zigarn commented 6 years ago

Will try to reduce the size of the image as much possible.