From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2FWHNpEl9WBJNAEAgWs5BA (envelope-from ) for ; Mon, 19 Jul 2021 09:11:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6IxJMpEl9WD6BgAAB5/wlQ (envelope-from ) for ; Mon, 19 Jul 2021 07:11:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E1739C1DB for ; Mon, 19 Jul 2021 09:11:12 +0200 (CEST) Received: from localhost ([::1]:52452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5NQl-0000m0-Vk for larch@yhetil.org; Mon, 19 Jul 2021 03:11:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5NQV-0000lQ-3p for help-guix@gnu.org; Mon, 19 Jul 2021 03:10:55 -0400 Received: from mail1.jheeta.com ([205.185.120.252]:46502 helo=ns1.sheergoodness.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5NQS-00046T-Te for help-guix@gnu.org; Mon, 19 Jul 2021 03:10:54 -0400 Received: (qmail 707376 invoked from network); 19 Jul 2021 07:10:49 -0000 Received: from d108-172-50-161.bchsia.telus.net (HELO localhost) (tj@jheeta.com@108.172.50.161) by ns1.sheergoodness.com with ESMTPA; 19 Jul 2021 07:10:49 -0000 References: <87sg0dzfza.fsf@sheer.tj> <87eebxf2u8.fsf@rdklein.fr> User-agent: mu4e 1.4.15; emacs 27.2 From: TJ To: Edouard Klein Subject: Re: Docker image sizes In-reply-to: <87eebxf2u8.fsf@rdklein.fr> Date: Mon, 19 Jul 2021 00:10:39 -0700 Message-ID: <87o8ayvkwg.fsf@sheer.tj> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=205.185.120.252; envelope-from=tj@sheer.tj; helo=ns1.sheergoodness.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626678673; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=zEFQd2Xp17MdrzD8bYmWcGDDFRyGjK3T+NaZNSzIBdc=; b=tyJaaklSt8TALwdqu2ZV3pU3u3HZqKXZhoJWawQOh2tITFBAr4AcUWdSd3hFfREt6K09Ne DWODaZu9OPZ0HLwL/m+N0ymXwc/deU3vmOx3aW0iCetH9nKHQz+JCRrKodLZpbgKg+ygoP gnitCW0XuHvLAcG71PIbkbnWyhb3EHmDDW2EXwJ5+7C9GnLk0E7yf2el1Npcs6iO8mMtDw Th0kxTCNMpYP1R6jN5pzJCLcVf/8hmMIxTXq88Zc5GZe9iqIAr/A5fm2pjzY3HUoxLS6IB i4V1c2llfiXN9/BMbjKF1FrNaJMCCltpfXQoE9/BbnxmT5lFya7Hm9dVJvlN1A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626678673; a=rsa-sha256; cv=none; b=cOWqqB6lqsgx6HLckp2jJret/1ANDji8xTzyFzUryO9BqRGkGqu7w93McfSRiBnOkhXxEl 9UsH2TkNnvmPvbL9RnR3TmqUnzvslHNOSj8piTJvYD4PrJNp5kCeZVHKVIBE45ufiRGdoh Eb2fvIF4HSsP93ClTh1nS2FhYc7GdOYgR2wzWKX8oKDvfsQSJj0tek0G9dNBwVAxK2TqtY Clm4O6gZHoP69QwllJ/rfvsvxq/lkg+/3T/4IeHHH0wqloKltFkM93G6l0V0F4njLjVzX+ efcdfqTNRYIWALQDe4/t1NC4acLQG36a8ZZJUb/ONUwcy6iHgRqt0XAvq3K1QQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: E1739C1DB X-Spam-Score: -0.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: R4ahs0Hnaq3X Thanks for the tip. I'm going to try to compile a minimal erlang. Edouard Klein writes: > Hi ! > > You can use guix graph to see what depends on what, and find out why a > specific dependency is needed: > > https://guix.gnu.org/manual/en/html_node/Invoking-guix-graph.html > > I just invoked: > guix graph elixir > /tmp/toto.dot > > and by manually inspecting the dot file I can see that e.g. webkit is needed > by wxWidgets, whether you need those or not is up to you. > > You can generate the visual graph with > dot -T pdf < /tmp/toto.dot > /tmp/toto.pdf > > I'm looking at it right now, and I see that elixir depends on erlang and > git, and that git is pulling perl with it. > > I doubt that's needed, so maybe you can create a new package > "lean-elixir", and forego the dependency on git somehow ? If you cut a > branch early in the DAG you may get huge returns on investment, > size-wise. > > > This may not be the best approach, maybe some wizards here will have > better ideas. > > Cheers, > > Edouard. > TJ writes: > >> 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