unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: TJ <tj@sheer.tj>
To: help-guix@gnu.org
Subject: Docker image sizes
Date: Fri, 16 Jul 2021 22:06:33 -0700	[thread overview]
Message-ID: <87sg0dzfza.fsf@sheer.tj> (raw)


Hi,

I was trying to package a project in docker and to start I did a fairly
straightforward command:

$ guix pack --format=docker elixir

It generated an image quite a bit larger than I expected.

-r--r--r--    2 root          root      461M Dec 31  1969 gfnqg760z22vr8kbvyzdzhs1hc5766c9-elixir-docker-pack.tar.gz

After uncompressing, this is taking 1.5GB and is including quite a few
unnecessary packages for a minimal image - see below for the top 30.

$ du -s * |sort -g -r | head -n 30
155804  g3idjpqsp2p2d163qfzskxj4k58nrx7f-llvm-11.0.0
145164  m59c9hj9d4n65maimbpmx2xq56d2mvqs-mesa-20.2.4
111708  q233v022vziq8ry18y8q959k110vclvf-webkitgtk-2.32.1
110840  cgqj7xswlpvhzxwri3mcqfs1fhbgnka8-erlang-23.2.1
103940  qk5v5vzwfl066zch67nxlv4x7aspf0fx-samba-4.13.4
93972   cw8brvxkzp4kmdqldsv1wkvi2cv4kq4x-python-3.8.2
64620   8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2
56300   18hp7flyb3yid3yp49i6qcdq0sbi5l1n-guile-3.0.2
52748   nscar35x261xky08qih2ddxq1b105qwd-gtk+-3.24.24
41092   fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31
39544   2wqjj3mkqdvsvksndr2hpjpi7qqwi7kr-icu4c-66.1
35848   fi1mdh30b5q6zvplvayn68lb575xcd1k-ghostscript-with-cups-9.52
34768   01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib
34188   wjmydimw608k61qxmsifkam11jwgpric-wxwidgets-3.0.5.1
24224   jv6v8p8jbjf6hpscgp3dgdfylrdhldi1-gdk-pixbuf+svg-2.40.0
18488   n8awazyldv9hbzb7pjcw76hiifmvrpvd-coreutils-8.32
18464   57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32
16596   jsqxxnaj5p8a22mrsvl679gi7jl26z4j-glib-2.62.6
16400   aza259fsrb841zwb4rjzfzs2nrsf28f1-eudev-3.2.9
16060   9z185s19zp2p9yq8gdayxgibaphxfcps-cups-2.3.3
15604   4l2il4wcxjb443xwc2arwixpq28pbfvl-cups-minimal-2.3.3
14140   02z5vgdhgxw4gcjvhx51mvy1ax4lzxmp-fftwf-3.3.8
13912   zzkly5rbfvahwqgcs7crz0ilpi7x5g5p-ncurses-6.2
13096   lv92cmzqjpb8mxygpqdvh0mkkkfi9vmz-libxcb-1.14
10876   n3pjsbpd51x6vqikfglmrdbijflammf6-gst-plugins-base-1.18.2
10588   sayvymkqjl328rsivzlp9r46337rvdmz-pulseaudio-14.0
10084   7y3lvk3xf4im8n44337mc6y0ccysvfia-font-dejavu-2.37
9888    hr1p9l1waam8lk2csdwbzaipf14h9n33-gstreamer-1.18.2
9576    a45p39mgqvfd8kjwibyr0q42k1mw7gmf-util-linux-2.35.1-lib
8812    z3vbqvpgcz7lag9qci074hjry4j3120i-shared-mime-info-1.15

I wouldn't expect to need llvm, mesa, webkit, samba, python, perl, gtk, cups, pulseaudio, etc, etc. in a production image.

What would be the recommended way to minimize the derivation?

Thanks,

TJ


             reply	other threads:[~2021-07-17 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17  5:06 TJ [this message]
2021-07-17 14:10 ` Docker image sizes Edouard Klein
2021-07-19  7:10   ` TJ
2021-07-17 15:53 ` Akib Azmain Turja
2021-08-17 13:19 ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sg0dzfza.fsf@sheer.tj \
    --to=tj@sheer.tj \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).