From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kNABKshN1F6oLgAA0tVLHw (envelope-from ) for ; Mon, 01 Jun 2020 00:37:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oKHUJchN1F4gNgAAB5/wlQ (envelope-from ) for ; Mon, 01 Jun 2020 00:37:28 +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 45977940145 for ; Mon, 1 Jun 2020 00:37:28 +0000 (UTC) Received: from localhost ([::1]:48172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfYSD-0002X5-Dj for larch@yhetil.org; Sun, 31 May 2020 20:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfYS7-0002Wz-2U for help-guix@gnu.org; Sun, 31 May 2020 20:37:19 -0400 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:40484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfYS6-0007H0-9u for help-guix@gnu.org; Sun, 31 May 2020 20:37:18 -0400 Received: by mail-qv1-xf34.google.com with SMTP id l3so3716552qvo.7 for ; Sun, 31 May 2020 17:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gFHcsWrsaTYsz/daPYBBMBtt72/G9oGha6YD7iPFrxw=; b=aCWQ9edPYq3Dnb75lZf+RSDjoljpy2uczbTrUzGoGIRlF+QpLEMnhcG5B7IsljnKKq wWgSz8NVGa2NqgRi/RbuLxJeujLrW7gXBhOhZQ62kboVs6whwOlGJ55ulq5mAxtjjWiZ z2gmSp6IDubpm/Yj2msSOgyINKvHsLRmXg18jUPVBCUzW4RV62gqo/1sAnfu9qt2tWZo 1QGrDRhdpgdXW2oNH5pYBtBDymWCLy8XXB309cRhovZL+dRzY/RFlTc5ReeZQYToddhR CF+5htr9Q2EvVX8iNB9faCNxLlC4jUIgPHebzKs6nnn9dkchssZdWycliRu8NTcFmrCQ Tw6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gFHcsWrsaTYsz/daPYBBMBtt72/G9oGha6YD7iPFrxw=; b=Apo1Jyjs1Eo1sA4LiU2hFmqHU6GJXTUOVBLq2ZA3FyuclzYDtwz3tDVsOMlRHUTZt3 IzOto9/C6PzCKQ4q/WhTXtVXKrJmKvYW2e5iM3F8BLOcFiDC93pjYIG4VJJrXnV+AjDb 437eIAarU1M6MvKbLfGg38UuJok0dyeaXYZChY/2buacSgi+PHzquKn5y8+dj0/rf2wG /5HrRf9jb1my0IW0fR+HVQKcMTQpRXg5uWV56ITgLs8bGKgVhWXRuphEtjUoDFlptCkB gEe0okOAXLBatflaMjlqTivncCR5nyQ4HwLDPvsZtMmTvncEPS0XDFlXFEf5WaPGDz8W NZzQ== X-Gm-Message-State: AOAM533HXgS6bKLf7afNXTcYL3FUZvwU2P90+mzCsoLHFn7KV0lnxAEs V+DRfYt+odDzQjSZb2cA0awK15nFaQyF9cDl0/I= X-Google-Smtp-Source: ABdhPJwtA+D2IpmBap2iegdhUA4YmdGA2oRfJ3v3kcoz7HDJrVd7Axoo40tg45XlWoN6/3UsZ/BKX4na1Sqa/2SzuF8= X-Received: by 2002:ad4:54aa:: with SMTP id r10mr11493332qvy.6.1590971837265; Sun, 31 May 2020 17:37:17 -0700 (PDT) MIME-Version: 1.0 References: <87h7vyxqrz.fsf@gmail.com> <87h7vvx1d8.fsf@gmail.com> In-Reply-To: <87h7vvx1d8.fsf@gmail.com> From: zimoun Date: Mon, 1 Jun 2020 02:37:05 +0200 Message-ID: Subject: Re: Guix Docker image inflation To: Chris Marusich Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=zimon.toutoune@gmail.com; helo=mail-qv1-xf34.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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 , Stephen Scheck Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=aCWQ9edP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Spam-Score: 0.09 X-TUID: 6aV3MIS3yF+8 Hi Chris, On Sun, 31 May 2020 at 23:04, Chris Marusich wrote: > Anyway, the point is: you begin with a previous image. The previous > image already has these store paths from the previous installation of > Guix. Therefore, they exist on the previous layer. Because they exist > on the previous layer, they cannot be removed from the Docker image, and > they are carried forward in that previous layer, to all new images. > Regardless of any changes to guix-daemon we might make, the way in which > you build your images will cause them to grow by hundreds of megabytes > every day. I agree that the core of the issue is the Docker layers filesystem. And it cannot be fixed on the Guix side. Therefore, even it is *bad* and dangerous, what about --8<---------------cut here---------------start------------->8--- root@guix /# guix gc root@guix /# guix gc --list-dead | xargs rm -rf root@guix /# exit $ docker stop $ docker commit $ docker export $ID | docker import - guix-new > --8<---------------cut here---------------end--------------->8--- ? Well, it cannot be recommended because it is dangerous. But it somehow bypasses the guix-daemon and "hard-removes" the items and then, as Vincent suggested, 'docker export | docker import' flattens the layers so the dead items are then really gone in the new Docker image. And I have shown [1], "guix gc+export/import" does not lead to an image where the dead items are gone, I have not mistaken. [1] http://issues.guix.gnu.org/41607#6 WDYT? Cheers, simon