[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"
- branch wip-container created (now 3e19b4d), David Thompson, 2015/06/08
- 01/10: build: syscalls: Add clone syscall wrapper., David Thompson, 2015/06/08
- 02/10: build: syscalls: Add additional mount flags., David Thompson, 2015/06/08
- 05/10: fixup linux container module., David Thompson, 2015/06/08
- 06/10: fixup linux container module.,
David Thompson <=
- 03/10: gnu: Add Linux container module., David Thompson, 2015/06/08
- 07/10: gnu: Add Linux container system script., David Thompson, 2015/06/08
- 04/10: build: Add setns syscall wrapper., David Thompson, 2015/06/08
- 09/10: gnu: system: Add operating-system-derivation/container., David Thompson, 2015/06/08
- 08/10: gnu: system: Do not activate firmware when activating a container., David Thompson, 2015/06/08
- 10/10: scripts: system: Add 'container' subcommand., David Thompson, 2015/06/08