GNU bug report logs -
#35697
[PATCH 0/8] Make 'guix system docker-image' readily usable
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sun, 12 May 2019 10:37:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Previously, the 'essential-services' would correspond to the initial,
non-containerized OS. Thus, all the file systems removed in
'container-essential-services' would actually still be there because the
essential services would be computed on the non-containerized OS.
This is a followup to 69cae3d3356a69b7fe69481338f760545995485e.
* gnu/system/linux-container.scm (container-essential-services): Call
'operating-system-default-essential-services' to get the baseline
services.
(containerized-operating-system): Pass THIS-OPERATING-SYSTEM, not OS, to
'container-essential-services'.
Add a dummy root file system to 'file-systems'.
---
gnu/system/linux-container.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 5adec064f7..fc2e05a5bc 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -45,7 +45,7 @@ from OS that are needed on the bare metal and not in a container."
(list (service-kind %linux-bare-metal-service)
firmware-service-type
system-service-type)))
- (operating-system-essential-services os)))
+ (operating-system-default-essential-services os)))
(cons (service system-service-type
(let ((locale (operating-system-locale-directory os)))
@@ -85,14 +85,20 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS."
(operating-system
(inherit os)
(swap-devices '()) ; disable swap
- (essential-services (container-essential-services os))
+ (essential-services (container-essential-services this-operating-system))
(services (remove (lambda (service)
(memq (service-kind service)
useless-services))
(operating-system-user-services os)))
(file-systems (append (map mapping->fs mappings)
extra-file-systems
- user-file-systems))))
+ user-file-systems
+
+ ;; Provide a dummy root file system.
+ (list (file-system
+ (mount-point "/")
+ (device "none")
+ (type "none")))))))
(define* (container-script os #:key (mappings '()))
"Return a derivation of a script that runs OS as a Linux container.
--
2.21.0
This bug report was last modified 6 years and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.