From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Creating a docker image with Guix Date: Mon, 02 Jan 2017 23:19:29 +0100 Message-ID: <87eg0l85qm.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOAx6-0008UM-AB for guix-devel@gnu.org; Mon, 02 Jan 2017 17:19:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOAx3-0006Xv-58 for guix-devel@gnu.org; Mon, 02 Jan 2017 17:19:36 -0500 In-Reply-To: (Ricardo Wurmus's message of "Mon, 2 Jan 2017 13:54:30 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel Hello! Ricardo Wurmus skribis: > I just played around with Docker and built up a command to create a > Docker image for Emacs. Fun! > Can anyone find a more elegant way to do this? > > guix environment --ad-hoc \ > coreutils bash emacs-no-x-toolkit -- \ > sh -c 'tar -c $(guix gc --requisites $GUIX_ENVIRONMENT) | \ > docker import -c "ONBUILD RUN [\"$GUIX_ENVIRONMENT/bin/ln\", \= "-s\", \"$GUIX_ENVIRONMENT/bin\", \"/bin\"]" - emacs-base' \ > && echo -e "FROM emacs-base\nCMD [\"/bin/emacs\"]" | \ > docker build - What does the resulting image look like? Would it be enough to generate an =E2=80=9CImage JSON Description=E2=80=9D = in this format: ? I=E2=80=99m not familiar enough with Docker but I=E2=80=99m under the impre= ssion that we should be able to generate an image without even using Docker. :-) Thanks for sharing the neat hack! Ludo=E2=80=99.