From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix pack -f docker ... works! Date: Fri, 09 Feb 2018 18:08:15 +0100 Message-ID: <87tvuqxf9c.fsf@gnu.org> References: <20180209131758.bz2mlnsthnkjwdla@kowloon> 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]:44270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekC9w-0003Tn-Nh for guix-devel@gnu.org; Fri, 09 Feb 2018 12:08:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekC9t-0007q5-J0 for guix-devel@gnu.org; Fri, 09 Feb 2018 12:08:24 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:57398) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekC9t-0007pg-BK for guix-devel@gnu.org; Fri, 09 Feb 2018 12:08:21 -0500 In-Reply-To: <20180209131758.bz2mlnsthnkjwdla@kowloon> (dvn's message of "Fri, 9 Feb 2018 14:17:58 +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: dvn Cc: guix-devel@gnu.org Hello! dvn skribis: > I'm experimenting with `guix pack`, particularly with the docker format. > > I want to generate a tarball like so `guix pack -f docker bash > figlet` -- and then after loading with docker, be able to run the packed > commands. No $PATH is set in the container, so after digging around in > the tarball, I decided to try something like this: `docker run -ti profil= e:lhavpi5ngs7infrh9b4nppriy4azgbwv > /gnu/store/ars9lm9jk9hgdifg0gqvf1jrvz5mdg1j-bash-4.4.12/bin/bash` -- and > that works! woo! > > This is much nicer than using an unverified Debian or Ubuntu layer in a d= ocker container, just have a > way of installing a few packages -- which is really all we need in contai= ners 99% of the time. Glad you like it. :-) > What have other people done in this direction? There=E2=80=99s Pjotr=E2=80=99s notes and a couple of blog posts about this: https://www.gnu.org/software/guix/blog/2017/creating-bundles-with-guix-pa= ck/ https://guix-hpc.bordeaux.inria.fr/blog/2017/10/using-guix-without-being-= root/ > What are some ideas for setting up the $PATH in a nice way? The pack already contains /gnu/store/=E2=80=A6-profile/etc/profile. You co= uld use =E2=80=98-S /etc=3Detc=E2=80=99 but you still have to source /etc/profi= le manually=E2=80=94well, except if you run Bash in the container since Bash is going to source /etc/profile automatically! We=E2=80=99ve been discussing ways to automate this (when one doesn=E2=80= =99t use Bash in the container), possibly by providing an entry point in the Docker metadata and things like that. Thanks for your feedback! Ludo=E2=80=99.