title: How to reduce docker image size?
body: <p>I'm using docker official rails onbuild pack (<a href="https://registry.hub.docker.com/_/rails/" rel="nofollow">https://registry.hub.docker.com/_/rails/</a>) to build and create rails image with application. But each application is taking about 900MB. Is there any way this size can be reduced?</p>
  
  <p>Here's my workflow -></p>
  
  <pre><code>add dockerfile to the project -&gt; build -&gt; run
  </code></pre>
  
  <p>The problem is there can be N number of apps on this system and if each application takes 1G of disk space it would be an issue. If we reduce layers will it reduce size? If yes how can that be done?</p>
  
  <pre><code>REPOSITORY           TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
  blog2                latest              9d37aaaa3beb        About a minute ago   931.1 MB
  my-rails-app         latest              9904zzzzc2af        About an hour ago    931.1 MB
  </code></pre>