From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +MUjI9Np017dNgAA0tVLHw (envelope-from ) for ; Sun, 31 May 2020 08:24:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4KPuHtNp017KVAAAbx9fmQ (envelope-from ) for ; Sun, 31 May 2020 08:24:51 +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 24146940D35 for ; Sun, 31 May 2020 08:24:51 +0000 (UTC) Received: from localhost ([::1]:53158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfJGz-0007Lr-Og for larch@yhetil.org; Sun, 31 May 2020 04:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfJGp-0007Le-7m for help-guix@gnu.org; Sun, 31 May 2020 04:24:39 -0400 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:37644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfJGo-00039o-DC for help-guix@gnu.org; Sun, 31 May 2020 04:24:38 -0400 Received: by mail-qk1-x72c.google.com with SMTP id b27so6332506qka.4 for ; Sun, 31 May 2020 01:24:37 -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=daSnxJIw51jCctLVLCCAYUum6szeqTFGwjdzZbh4jZ4=; b=tSKSFfmfjdmCO3ZrDp0vkRc3bDuqgvEs4Eqrml4m8Ussqy8bsvxogt94Q0VuAxnqVI iiiCnWL53dE5DyTTIVo0c4gx0CCUWk5yxwNojIpSAnw3GzpJLQ7rNfEjBPNqZYe9/5zq peK48bmWWsJ9PFb/TW1kLd4YEclUoDe+wkkA0L4+mM/sLeomp3XDlyiJBXvaFq+b/Rqd Daj64w/OUjrc730qI1pXzwMtfIYJO1Dvrlpwo3Gion8UChQz67G4ObohhUby6e1yQvZw wDBWNIH/+9eta3dz2ocBrazBjqw69Zo2PfZfE82URVHesXmzWl0/lTVFmkA6ijzTOWzY dA1Q== 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=daSnxJIw51jCctLVLCCAYUum6szeqTFGwjdzZbh4jZ4=; b=c9CEMCU/95r8b0MIjkV90zVx1/Tuk1myErNXcgHGR+fOz9lCby6Nrs/4vwunGX6svt 1KBAozF+qEuFveGwszqsqTnP+L1DCG6hxq8PmkOnTV7T5ZA5Wlv2YqD/JbJg56QU7f+3 LaTW1fkPFcW0/4PBLWdl2yqo7G4PryW+pR2zRNsyI0mqOhROP/RHBQF9zKW+ySdsHGo8 SgBYrOETWrn161cxPd7uA32hFsGaqJN6/kTOt3EvPfS1dB+l5qgXmmzMFvaDiTNkIjk1 0M6MFYK1fxrjxs8B9FuqZzktx57ysyEYyScSGqBrZ2eWijULLtmmvHdiIs/ssQjmA1AG h/hA== X-Gm-Message-State: AOAM5318RYr5OmcHpgbF2UnQUGM5ly09IRtdpX21gmMPiFmeTzDOyyZ7 knv+hv/bc52yHk0ODoHNFuuPlWtSwZg794Ce2+E= X-Google-Smtp-Source: ABdhPJyPXj9CulTaj71OCbMZEBfrazd4oAzTEqLlEOwTZzpI4B8wbU6d1O0mjnFILeH8b7Y5ziPEPpkImgV4XHc6X9w= X-Received: by 2002:ae9:f214:: with SMTP id m20mr14976159qkg.232.1590913476824; Sun, 31 May 2020 01:24:36 -0700 (PDT) MIME-Version: 1.0 References: <87h7vyxqrz.fsf@gmail.com> In-Reply-To: From: zimoun Date: Sun, 31 May 2020 10:24:25 +0200 Message-ID: Subject: Re: Guix Docker image inflation To: Stephen Scheck , 41607@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=zimon.toutoune@gmail.com; helo=mail-qk1-x72c.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 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=tSKSFfmf; 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: Q0ywcfAIivZ6 Dear Stephen, Follow ups of https://lists.gnu.org/archive/html/help-guix/2020-05/msg00249.html and bug#41607 CC http://issues.guix.gnu.org/41607 On Sat, 30 May 2020 at 19:02, Stephen Scheck wrote: > You can convince yourself of this by doing something like the following: > > docker run > docker exec dd if=/dev/urandom of=/RANDOM-DATA > bs=1048576 count=1024 > docker commit > docker exec rm /RANDOM-DATA > docker commit It does not convince myself and maybe I am doing wrongly but it is not what I am observing for an example with more than 2 'commits'. Here my session, based on your images rename "fresh" because it will happen on any image. --8<---------------cut here---------------start------------->8--- $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE fresh latest c36cef8306d5 3 weeks ago 1.06GB singularsyntax/guix-bootstrap 1.1.0-alpine-3.11 c36cef8306d5 3 weeks ago 1.06GB $ CONTAINER=`docker run --detach --tty --privileged fresh` $ docker exec --interactive --tty $CONTAINER /bin/sh / # dd if=/dev/urandom of=/DATA bs=1234567 count=1024 dd if=/dev/urandom of=/DATA bs=1234567 count=1024 1024+0 records in 1024+0 records out / # exit exit $ HASH=`docker commit $CONTAINER` && docker tag $HASH add-data $ docker stop $CONTAINER && docker rm $CONTAINER cb89992b76ace2afe5dc6e082c8de121c483dfeeb688d89849713e2cf90b68c7 cb89992b76ace2afe5dc6e082c8de121c483dfeeb688d89849713e2cf90b68c7 $ CONTAINER=`docker run --detach --tty --privileged add-data` $ docker exec --interactive --tty $CONTAINER /bin/sh / # rm /DATA rm /DATA / # dd if=/dev/urandom of=/OTHER bs=1234567 count=1024 dd if=/dev/urandom of=/OTHER bs=1234567 count=1024 1024+0 records in 1024+0 records out / # exit exit $ HASH=`docker commit $CONTAINER` && docker tag $HASH rm-data-add-other $ docker stop $CONTAINER && docker rm $CONTAINER 93e9afe593226ec29669efe8515b47487f455d4ad5e012cc67372c2549ec7256 93e9afe593226ec29669efe8515b47487f455d4ad5e012cc67372c2549ec7256 $ CONTAINER=`docker run --detach --tty --privileged rm-data-add-other` $ docker exec --interactive --tty $CONTAINER /bin/sh / # rm /OTHER rm /OTHER / # exit exit $ HASH=`docker commit $CONTAINER` && docker tag $HASH rm-other $ docker stop $CONTAINER && docker rm $CONTAINER 469b341c2f394ef05f5f43a5d96239853e3552d979028a457a9bdd1096a8fab4 469b341c2f394ef05f5f43a5d96239853e3552d979028a457a9bdd1096a8fab4 $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE rm-other latest b80d300aa755 23 seconds ago 3.59GB rm-data-add-other latest de551eac1d55 About a minute ago 3.59GB add-data latest 6a563daccccd 3 minutes ago 2.32GB fresh latest c36cef8306d5 3 weeks ago 1.06GB singularsyntax/guix-bootstrap 1.1.0-alpine-3.11 c36cef8306d5 3 weeks ago 1.06GB $ CONTAINER=`docker run --detach --tty --privileged rm-other` $ docker exec --interactive --tty $CONTAINER /bin/sh / # ls / ls / bin dev etc gnu home lib media mnt opt proc root run sbin srv sys tmp usr var / # exit exit --8<---------------cut here---------------end--------------->8--- > You'll end up with two new images - the first one should be about 1 GB > larger than the base image, > the second one the same size. As you see, the image 'rm-other' does not container either /DATA or /OTHER and its size is not the same than the initial one 'fresh'. So I do not know if the correct Docker terminology is "layer" because the issue is definitely on the Docker side and not on the Guix side. Cheers, simon