From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoo9a-0000z8-3g for guix-patches@gnu.org; Thu, 22 Feb 2018 05:31:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoo9W-0000eJ-Uj for guix-patches@gnu.org; Thu, 22 Feb 2018 05:31:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47397) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoo9W-0000dn-RA for guix-patches@gnu.org; Thu, 22 Feb 2018 05:31:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eoo9W-0006iS-KU for guix-patches@gnu.org; Thu, 22 Feb 2018 05:31:02 -0500 Subject: [bug#30572] [PATCH 0/7] Add "guix system docker-image" command Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoo8U-0008VD-2G for guix-patches@gnu.org; Thu, 22 Feb 2018 05:29:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoo8Q-0007hA-St for guix-patches@gnu.org; Thu, 22 Feb 2018 05:29:58 -0500 Received: from mail-pg0-x229.google.com ([2607:f8b0:400e:c05::229]:46857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoo8Q-0007fu-M1 for guix-patches@gnu.org; Thu, 22 Feb 2018 05:29:54 -0500 Received: by mail-pg0-x229.google.com with SMTP id m1so1839481pgp.13 for ; Thu, 22 Feb 2018 02:29:54 -0800 (PST) From: Chris Marusich Date: Thu, 22 Feb 2018 11:29:33 +0100 Message-Id: <20180222102933.4978-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 Hi, This patch series adds a new command: "guix system docker-image". I have the following questions for reviewers: * In raw-initrd and base-initrd (gnu/system/linux-initrd.scm), why is %guile-static-stripped the right Guile to use by default? * Instead of passing a Guile package to raw-initrd and base-initrd, would it be better to use a parameter (e.g., %guile-for-initrd), like we do for %guile-for-build? * In system-docker-image (gnu/system/vm.scm), why is it necessary to define a custom (guix config) module? I copied some of the logic from docker-image (guix/scripts/pack.scm), and it works, but I do not understand this part. * Similarly, in gnu/system/vm.scm, why do we autoload libgcrypt? I do not understand why we cannot simply #:use-module (gnu packages gnupg) like we do with all the other modules here. * Similarly, in gnu/system/vm.scm, why do we use (ungexp-native json)? In the code, this is #+json and it occurs close to the comment "Guile-JSON is required by (guix docker)." * Similarly, in gnu/system/vm.scm, there is a vestigial comment which says "This variable is unused but allows us to add INPUTS-TO-COPY as inputs" - this comment actually occurs in multiple places, not just the code I've added. I think it refers to a variable that no longer exists, and I think that my variable to-register serves the intended purpose now, which is: add os-drv's inputs to the inputs of the gexp I'm building, so that they will be available on the build side. So I'm thinking maybe we should just change this comment to say something more like that. WDYT? I have verified that this change builds and its tests pass. I am using it to run my very own Docker image today. I hope you find it useful, too! Chris Marusich (7): tests: Add tests for "guix pack". vm: Allow control of deduplication in root-partition-initializer. system: Allow customization of the initrd's Guile. docker: Allow the use of a custom temporary directory. docker: Allow the addition of extra files into the image. system: Add "guix system docker-image" command. tests: Add tests for "guix system disk-image" et al. Makefile.am | 1 + doc/guix.texi | 74 ++++++++++++++++------ gnu/build/vm.scm | 12 ++-- gnu/system/examples/docker-image.tmpl | 47 ++++++++++++++ gnu/system/linux-initrd.scm | 31 ++++++--- gnu/system/vm.scm | 116 ++++++++++++++++++++++++++++++++++ guix/docker.scm | 29 +++++++-- guix/scripts/system.scm | 10 ++- tests/guix-pack.sh | 43 +++++++++++++ tests/guix-system.sh | 13 ++++ 10 files changed, 333 insertions(+), 43 deletions(-) create mode 100644 gnu/system/examples/docker-image.tmpl create mode 100644 tests/guix-pack.sh -- 2.15.1