guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/10: fixup linux container module.


From: David Thompson
Subject: 06/10: fixup linux container module.
Date: Mon, 08 Jun 2015 14:04:28 +0000

davexunit pushed a commit to branch wip-container
in repository guix.

commit 0a903faf5ab8144a83a1892e42d7b01473d297d9
Author: David Thompson <address@hidden>
Date:   Mon Jun 8 08:44:24 2015 -0400

    fixup linux container module.
---
 gnu/build/linux-container.scm |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm
index 25b0139..0b16b4c 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -45,12 +45,15 @@ disassociated from the current process."
   "Run THUNK in a new container process with the root file system located at
 ROOT-DIR.  SHARED-DIRS is a list of (HOST-DIR CONTAINER-DIR) tuples that will
 be bind mounted within the container."
-  (define (in-container dir)
+  (define (scope dir)
     (string-append root-dir dir))
 
-  (let* ((new-proc   (in-container "/proc"))
-         (new-dev    (in-container "/dev"))
-         (new-sys    (in-container "/sys"))
+  ;; The container setup procedure closely resembles that of the Docker
+  ;; specification:
+  ;; https://raw.githubusercontent.com/docker/libcontainer/master/SPEC.md
+  (let* ((new-proc   (scope "/proc"))
+         (new-dev    (scope "/dev"))
+         (new-sys    (scope "/sys"))
          (dev-shm    (string-append new-dev "/shm"))
          (dev-mqueue (string-append new-dev "/mqueue"))
          (dev-pts    (string-append new-dev "/pts"))
@@ -76,8 +79,7 @@ be bind mounted within the container."
       ;;   (lambda (port)
       ;;     (format port "0 ~d 1" gid)))
 
-      ;; Create essential mount points as specified by Docker:
-      ;; https://raw.githubusercontent.com/docker/libcontainer/master/SPEC.md
+      ;; Create essential mount points.
       (mount* "none" new-proc "proc"
               (logior MS_NOEXEC MS_NOSUID MS_NODEV))
       (mount* "none" new-dev "tmpfs"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]