[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30572] [PATCH 4/7] docker: Allow the use of a custom temporary dire
[bug#30572] [PATCH 4/7] docker: Allow the use of a custom temporary directory.
Thu, 22 Feb 2018 11:35:25 +0100
* 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
@@ -106,7 +106,8 @@ return \"a\"."
#:key closure compressor
(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
+ (let ((directory (string-append tmpdir "/docker-image")) ;temporary working
(closure (canonicalize-path closure))
(id (docker-id path))
(time (date->string (time-utc->date creation-time) "~4"))
[bug#30572] [PATCH 3/7] system: Allow customization of the initrd's Guile., Chris Marusich, 2018/02/22
[bug#30572] [PATCH 7/7] tests: Add tests for "guix system disk-image" et al., Chris Marusich, 2018/02/22