From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ricardo Wurmus Newsgroups: gmane.emacs.devel Subject: Re: official Emacs Docker image Date: Fri, 06 Jan 2017 16:56:50 +0100 Message-ID: <87wpe8chbx.fsf@elephly.net> References: <87mvukq7gd.fsf_-_@lifelogs.com> <877fcyg5ah.fsf@lifelogs.com> <87h9c0b6bd.fsf@lifelogs.com> <878txa9zvx.fsf@lifelogs.com> <87mvfbzrfa.fsf@elephly.net> <87inpzyww9.fsf@elephly.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1483721432 27274 195.159.176.226 (6 Jan 2017 16:50:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jan 2017 16:50:32 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.1.1 Cc: John Wiegley , Richard Stallman , emacs-devel To: Elias =?utf-8?Q?M=C3=A5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 06 17:50:27 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPXih-00064C-BR for ged-emacs-devel@m.gmane.org; Fri, 06 Jan 2017 17:50:23 +0100 Original-Received: from localhost ([::1]:53747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPXil-0004bK-HG for ged-emacs-devel@m.gmane.org; Fri, 06 Jan 2017 11:50:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPWtA-0005JE-8e for emacs-devel@gnu.org; Fri, 06 Jan 2017 10:57:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPWt9-0005Wc-4x for emacs-devel@gnu.org; Fri, 06 Jan 2017 10:57:08 -0500 Original-Received: from sender163-mail.zoho.com ([74.201.84.163]:21304) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPWt3-0005Su-Hf; Fri, 06 Jan 2017 10:57:01 -0500 Original-Received: from localhost (141.80.148.253 [141.80.148.253]) by mx.zohomail.com with SMTPS id 1483718214793372.72019646118304; Fri, 6 Jan 2017 07:56:54 -0800 (PST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.201.84.163 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211145 Archived-At: Elias Mårtenson writes: > On 1 January 2017 at 17:03, Ricardo Wurmus wrote: > >> >> Elias Mårtenson writes: >> >> > Arguably there should be a fully free distribution that could be the base >> > for more than just Emacs. >> >> GuixSD is a fully free GNU distribution and it comes with the tools that >> are needed to determine runtime dependencies that can then turned into a >> Docker image. Since Guix is a functional package manager and thus can >> account for the full closure of a package it doesn’t require a base >> image and can be the base itself. > > > I have to admit that I don't fully know what Guix is, but based on what you > say, it would still make sense to have a base (Guix, in this case) that > other containers base themselves on. That way the storage can be shared > between containers. Guix is a functional package manager. Given a package it can extract the “closure” of the package, i.e. the package and all its dependencies, recursively. Since commit 03476a23f Guix can build Docker images without requiring Docker, simply by recursively exporting a package along with its dependencies, all the way down to things like the glibc. Here’s how to build a Docker image of Emacs (along with coreutils and bash, so that M-x shell and a couple more things work out of the box): guix environment --ad-hoc emacs-no-x-toolkit coreutils bash guix archive --export -f docker $GUIX_ENVIRONMENT The generated archive can the be loaded with “docker load”. A user can then run Emacs with the usual “docker run … $imageid /bin/emacs” invocation. For simpler packages it would be sufficient to do something like this: guix archive --export -f docker $(guix build the-package) -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC http://elephly.net