From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etSVe-00015u-Vv for guix-patches@gnu.org; Wed, 07 Mar 2018 01:25:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etSVb-00072C-QR for guix-patches@gnu.org; Wed, 07 Mar 2018 01:25:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:40478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etSVb-000725-NJ for guix-patches@gnu.org; Wed, 07 Mar 2018 01:25:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etSVa-0003h7-8b for guix-patches@gnu.org; Wed, 07 Mar 2018 01:25:03 -0500 Subject: [bug#30572] [PATCH 4/7] docker: Allow the use of a custom temporary directory. Resent-Message-ID: From: Chris Marusich References: <20180222103528.5108-1-cmmarusich@gmail.com> <20180222103528.5108-4-cmmarusich@gmail.com> <20180226014859.4f7fe37c@scratchpost.org> <87po4rra78.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <20180227004658.4cefda82@scratchpost.org> <87y3jfvy7k.fsf@gmail.com> <87r2p6z7td.fsf@gnu.org> Date: Wed, 07 Mar 2018 07:24:30 +0100 In-Reply-To: <87r2p6z7td.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 27 Feb 2018 18:00:30 +0100") Message-ID: <87k1uoiesh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30572@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Chris Marusich skribis: > >> +TMPDIR is the name of the temporary working directory to use. This can= be >> +useful if you need to use a specific temporary directory, for example b= ecause >> +the default temporary directory lies on a file system with insufficient >> +space." > > Usually this code is used in a derivation, where it doesn=E2=80=99t really > matter which directory is used, no? I added this because I thought I needed it in order to implement "guix system docker-image". I build the Docker image in a VM, and the VM's file system is too small to hold all the transient files that are created by build-docker-image (in guix/docker.scm). Without this change, the derivation fails due to lack of space within the VM. I work around this limitation by using the /xchg directory as the temporary directory in the VM, which does have enough space to hold all the transient files. However, thinking about this now, maybe the right thing to do is to adjust the heuristics for guessing the right disk size in expression->derivation-in-linux-vm (in gnu/system/vm.scm). Or maybe I can just provide my own estimate via the #:disk-image-size argument. Maybe if I adjust that, I will be able to build the Docker image without specifying a custom temporary directory. That would be nice; I'll try to do it and let you know how it goes. Another option here would be to build the Docker image without using a VM in the first place. Perhaps we can use namespaces, but I haven't tried that yet, since the VM approach worked. I tried without a VM first, and I quickly found that I couldn't do many things in a normal derivation that I needed to do in order to build the image (e.g., create device files). I don't know if I can do all those necessary things without using a VM. But I think we can iterate on that after this patch series gets committed. What do you think? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlqfhZ4ACgkQ3UCaFdgi Rp15Dw//Z5kKz0TMqKyJNHwwM9wdQHrx38pe3SggegI2mq33IDxtM8T1sqYqYZ7U p8evarFKbaFCG1abSjKCBBptS1eYk/krKSsQrfGsceFgkMOlr3cGCwZ6rfpkXVx+ p8l1atVTNYQg9n6mzeTWlweRJ/SeLSTptv1o7FIt9EW++SSrc8ZwzbbTQiGr/uFD Zy/V0kBUvau3A7FUPufk8bXMDijzWvoL4dKZrvybXCbcuBlJfb0cuGYSfpKFG4mR agS5Z2ArnSYdGb5SXhfG/p+kBktAV1ofT/A0xz1yDsZhT9U81s36mQGH78n5Jk8Z nrXKflPQEdx8xs93Dt5wxGa4+f+iXB1vi6d47zQ9QUTTFbwSZhAVHwmyso6r7bkG my6yoh7QFeDqIrKddAGJ5EGCpnOw5n/voFa08GFFHC/NkQ1ZxZV+RsCekyegDn0L B2bG65H0zP8N1/fk5tXSWqfsJHfq9SpdAc4SVNiEHyFWHkzT9T5mhjOptW7sBNix 3+JlSLK9MvPSyZy3xj3NxvCC5N1uo+nghtNag5mZBWHMKYQlMhAGpmhOhTZJotLb vr9hjmPmAhnzj6dORYZ2F5rJIPhih2kaPLgIbdN3+674SmjPSg+sd5hZh0vPd9aN ZuH8nk3/iixGmjbiwJpE0JHL9cnGfoM9EfjaqwzCSlUweuxETlA= =3KG5 -----END PGP SIGNATURE----- --=-=-=--