From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eooFO-00039j-T1 for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eooFL-0002wC-QI for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47423) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eooFL-0002vy-LL for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eooFL-0006sX-GY for guix-patches@gnu.org; Thu, 22 Feb 2018 05:37:03 -0500 Subject: [bug#30572] [PATCH 4/7] docker: Allow the use of a custom temporary directory. Resent-Message-ID: From: Chris Marusich Date: Thu, 22 Feb 2018 11:35:25 +0100 Message-Id: <20180222103528.5108-4-cmmarusich@gmail.com> In-Reply-To: <20180222103528.5108-1-cmmarusich@gmail.com> References: <20180222103528.5108-1-cmmarusich@gmail.com> 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: 30572@debbugs.gnu.org Cc: Chris Marusich * guix/docker.scm: (build-docker-image): Add #:tmpdir keyword argument. --- guix/docker.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/guix/docker.scm b/guix/docker.scm index 060232148..693b4426f 100644 --- a/guix/docker.scm +++ b/guix/docker.scm @@ -106,7 +106,8 @@ return \"a\"." #:key closure compressor (symlinks '()) (system (utsname:machine (uname))) - (creation-time (current-time time-utc))) + (creation-time (current-time time-utc)) + (tmpdir "/tmp")) "Write to IMAGE a Docker image archive from the given store PATH. The image contains the closure of PATH, as specified in CLOSURE (a file produced by #:references-graphs). SYMLINKS must be a list of (SOURCE -> TARGET) tuples @@ -115,8 +116,13 @@ to PATH. SYSTEM is a GNU triplet (or prefix thereof) of the system the binaries at PATH are for; it is used to produce metadata in the image. Use COMPRESSOR, a command such as '(\"gzip\" \"-9n\"), to compress IMAGE. Use -CREATION-TIME, a SRFI-19 time-utc object, as the creation time in metadata." - (let ((directory "/tmp/docker-image") ;temporary working directory +CREATION-TIME, a SRFI-19 time-utc object, as the creation time in metadata. + +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." + (let ((directory (string-append tmpdir "/docker-image")) ;temporary working directory (closure (canonicalize-path closure)) (id (docker-id path)) (time (date->string (time-utc->date creation-time) "~4")) -- 2.15.1