unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 30572@debbugs.gnu.org
Subject: [bug#30572] [PATCH 4/7] docker: Allow the use of a custom temporary directory.
Date: Wed, 07 Mar 2018 07:24:30 +0100	[thread overview]
Message-ID: <87k1uoiesh.fsf@gmail.com> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Chris Marusich <cmmarusich@gmail.com> 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 because
>> +the default temporary directory lies on a file system with insufficient
>> +space."
>
> Usually this code is used in a derivation, where it doesn’t 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?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-03-07  6:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <handler.30572.B.151929540925748.ack@debbugs.gnu.org>
2018-02-22 10:35 ` [bug#30572] [PATCH 1/7] tests: Add tests for "guix pack" Chris Marusich
2018-02-22 10:35   ` [bug#30572] [PATCH 2/7] vm: Allow control of deduplication in root-partition-initializer Chris Marusich
2018-02-25 14:02     ` Danny Milosavljevic
2018-02-22 10:35   ` [bug#30572] [PATCH 3/7] system: Allow customization of the initrd's Guile Chris Marusich
2018-02-22 12:10     ` Chris Marusich
2018-02-27 17:04       ` Ludovic Courtès
2018-03-07  5:56         ` Chris Marusich
2018-03-07 15:20           ` Ludovic Courtès
2018-02-22 10:35   ` [bug#30572] [PATCH 4/7] docker: Allow the use of a custom temporary directory Chris Marusich
2018-02-26  0:48     ` Danny Milosavljevic
2018-02-26 16:23       ` Chris Marusich
2018-02-26 23:46         ` Danny Milosavljevic
2018-02-27  4:43           ` Chris Marusich
2018-02-27 17:00             ` Ludovic Courtès
2018-03-07  6:24               ` Chris Marusich [this message]
2018-03-07 15:24                 ` Ludovic Courtès
2018-02-22 10:35   ` [bug#30572] [PATCH 5/7] docker: Allow the addition of extra files into the image Chris Marusich
2018-02-25 23:36     ` Danny Milosavljevic
2018-02-26 16:25       ` Chris Marusich
2018-02-26 23:47         ` Danny Milosavljevic
2018-02-27 17:08         ` Ludovic Courtès
2018-02-22 10:35   ` [bug#30572] [PATCH 6/7] system: Add "guix system docker-image" command Chris Marusich
2018-02-26 16:30     ` Chris Marusich
2018-02-27 17:17       ` Ludovic Courtès
2018-03-03  7:31         ` Chris Marusich
2018-02-22 10:35   ` [bug#30572] [PATCH 7/7] tests: Add tests for "guix system disk-image" et al Chris Marusich
2018-02-25 14:05     ` Danny Milosavljevic
2018-02-27 16:32   ` [bug#30572] [PATCH 1/7] tests: Add tests for "guix pack" Ludovic Courtès
2018-03-06  5:53     ` Chris Marusich
2018-03-08 21:05       ` Ludovic Courtès

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=87k1uoiesh.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=30572@debbugs.gnu.org \
    --cc=ludo@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).