title: Docker image size not matching the announced size on https://github.com/docker-library/repo-info
body: <p>I'm pulling images from the main default docker registry without adding anything to them, so I would expect them to have the exact size which is annouced on : <a href="https://github.com/docker-library/repo-info" rel="nofollow noreferrer">https://github.com/docker-library/repo-info</a>, but it's not the case.</p>
  
  <p>Example :</p>
  
  <pre><code>$ docker pull tomcat:8.5-jre8
  $ docker pull tomcat:8.5-jre8-alpine
  
  $ docker images
  REPOSITORY              TAG                 IMAGE ID            SIZE
  tomcat                  8.5-jre8            7f855aeeaebf        **365 MB**
  tomcat                  8.5-jre8-alpine     fa2fcc85fc1a        **135 MB**
  </code></pre>
  
  <p>Announced sizes :</p>
  
  <ul>
  <li><p><a href="https://github.com/docker-library/repo-info/blob/master/repos/tomcat/tag-details.md#tomcat85-jre8" rel="nofollow noreferrer">https://github.com/docker-library/repo-info/blob/master/repos/tomcat/tag-details.md#tomcat85-jre8</a> - Total Size: <strong>145.5 MB</strong></p></li>
  <li><p><a href="https://github.com/docker-library/repo-info/blob/master/repos/tomcat/tag-details.md#tomcat85-jre8-alpine" rel="nofollow noreferrer">https://github.com/docker-library/repo-info/blob/master/repos/tomcat/tag-details.md#tomcat85-jre8-alpine</a> - Total Size: <strong>56.4 MB</strong></p></li>
  </ul>
  
  <p>So 365 MB vs 145.5 MB and 135 MB vs 56.4 MB, what is the reason of this difference ?</p>
  
  <p>I have to say I'm using overlay2 as storage driver (but I've just checked I have the exact same sizes and image history when using aufs).</p>
  
  <p>If it helps understand the size :</p>
  
  <pre><code>$ docker history tomcat:8.5-jre8-alpine
  IMAGE               CREATED BY                                      SIZE                COMMENT
  fa2fcc85fc1a        /bin/sh -c #(nop)  CMD ["catalina.sh" "run"]    0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  EXPOSE 8080/tcp              0 B
  &lt;missing&gt;           /bin/sh -c set -e  &amp;&amp; nativeLines="$(catal...   0 B
  &lt;missing&gt;           /bin/sh -c set -x   &amp;&amp; apk add --no-cache ...   16.6 MB
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV TOMCAT_ASC_URL=http...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV TOMCAT_TGZ_URL=http...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV TOMCAT_VERSION=8.5.11    0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV TOMCAT_MAJOR=8           0 B
  &lt;missing&gt;           /bin/sh -c set -ex;  for key in $GPG_KEYS;...   126 kB
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV GPG_KEYS=05AB331109...   0 B
  &lt;missing&gt;           /bin/sh -c apk add --no-cache gnupg             10.1 MB
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV LD_LIBRARY_PATH=/us...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV TOMCAT_NATIVE_LIBDI...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  WORKDIR /usr/local/tomcat    0 B
  &lt;missing&gt;           /bin/sh -c mkdir -p "$CATALINA_HOME"            0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV PATH=/usr/local/tom...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV CATALINA_HOME=/usr/...   0 B
  &lt;missing&gt;           /bin/sh -c set -x  &amp;&amp; apk add --no-cache  ...   103 MB
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV JAVA_ALPINE_VERSION...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV JAVA_VERSION=8u111       0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV PATH=/usr/local/sbi...   0 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV JAVA_HOME=/usr/lib/...   0 B
  &lt;missing&gt;           /bin/sh -c {   echo '#!/bin/sh';   echo 's...   87 B
  &lt;missing&gt;           /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0 B
  &lt;missing&gt;           /bin/sh -c #(nop) ADD file:3df55c321c1c8d7...   4.81 MB
  </code></pre>