From patchwork Sun May 12 10:30:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 13955 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 89FED16F4A; Sun, 12 May 2019 11:37:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0221416F26 for ; Sun, 12 May 2019 11:37:10 +0100 (BST) Received: from localhost ([127.0.0.1]:41483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPlqv-0006YP-4s for patchwork@mira.cbaines.net; Sun, 12 May 2019 06:37:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPlqp-0006Wh-O1 for guix-patches@gnu.org; Sun, 12 May 2019 06:37:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPlqo-0006iD-OI for guix-patches@gnu.org; Sun, 12 May 2019 06:37:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56606) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hPlqo-0006i4-Kf for guix-patches@gnu.org; Sun, 12 May 2019 06:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hPlqo-0002oG-Bp for guix-patches@gnu.org; Sun, 12 May 2019 06:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35697] [PATCH 0/8] Make 'guix system docker-image' readily usable Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 May 2019 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35697 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35697@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155765742110791 (code B ref -1); Sun, 12 May 2019 10:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 May 2019 10:37:01 +0000 Received: from localhost ([127.0.0.1]:41917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPlqn-0002nz-3A for submit@debbugs.gnu.org; Sun, 12 May 2019 06:37:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPlql-0002nl-H4 for submit@debbugs.gnu.org; Sun, 12 May 2019 06:36:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:47898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPlqg-0006c1-8b for submit@debbugs.gnu.org; Sun, 12 May 2019 06:36:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPlqf-0006FK-5U for guix-patches@gnu.org; Sun, 12 May 2019 06:36:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPll4-0003YW-T3; Sun, 12 May 2019 06:31:06 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41580 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hPll1-0004T3-3v; Sun, 12 May 2019 06:31:04 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sun, 12 May 2019 12:30:55 +0200 Message-Id: <20190512103055.16832-1-ludo@gnu.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Marusich Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello Guix, On current master, ‘guix system docker-image’ produces an image without an entry point, so one has to carefully follow the “GUIX_NEW_SYSTEM hack” described in the manual. Furthermore, due to other issues, the resulting image doesn’t properly boot because it tries to mount file systems that it cannot mount, such as /dev/shm and /dev/pts. These patches fix both issues, such that one can just do ‘docker create’ and ‘docker start’ to get Guix System up and running in the container. I think that’s a nice improvement. :-) We discussed this Friday on IRC and people said that it’s quite unusual to provide a “full OS” (with PID 1) as a Docker image; instead, people would rather do one image per (micro)service. But anyway, that’s the purpose of ‘guix system docker-image’, and I can imagine it has use cases too. For example, it’s a simple way to get Guix set up in a container, for people who want to perform Guix builds in a container. Thoughts? Ludo’. Ludovic Courtès (8): system: Export 'operating-system-default-essential-services'. linux-container: Improve filtering of unnecessary file systems. services: 'gc-root-service-type' now has a default value. linux-container: Do not add %CONTAINER-FILE-SYSTEMS to Docker image OSes. linux-container: Compute essential services for THIS-OPERATING-SYSTEM. system: Add 'operating-system-with-gc-roots'. docker: 'build-docker-image' accepts an optional #:entry-point. vm: 'system-docker-image' provides an entry point. doc/guix.texi | 18 +++-- gnu/services.scm | 5 +- gnu/system.scm | 18 ++++- gnu/system/linux-container.scm | 30 ++++++--- gnu/system/vm.scm | 18 ++++- gnu/tests/docker.scm | 118 ++++++++++++++++++++++++++++++++- gnu/tests/install.scm | 11 --- guix/docker.scm | 15 +++-- 8 files changed, 195 insertions(+), 38 deletions(-)