all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guix pack -f docker ... works!
@ 2018-02-09 13:17 dvn
  2018-02-09 14:26 ` Pjotr Prins
  2018-02-09 17:08 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: dvn @ 2018-02-09 13:17 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

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 profile: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 docker container, just have a
way of installing a few packages -- which is really all we need in containers 99% of the time.

What have other people done in this direction? What are some ideas for
setting up the $PATH in a nice way?

cheers,
Devan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: guix pack -f docker ... works!
  2018-02-09 13:17 guix pack -f docker ... works! dvn
@ 2018-02-09 14:26 ` Pjotr Prins
  2018-02-09 17:08 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Pjotr Prins @ 2018-02-09 14:26 UTC (permalink / raw)
  To: dvn; +Cc: guix-devel

On Fri, Feb 09, 2018 at 02:17:58PM +0100, dvn wrote:
> 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 profile: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 docker container, just have a
> way of installing a few packages -- which is really all we need in containers 99% of the time.
> 
> What have other people done in this direction? What are some ideas for
> setting up the $PATH in a nice way?

Use -S, some examples

  https://github.com/pjotrp/guix-notes/blob/master/CONTAINERS.org


-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: guix pack -f docker ... works!
  2018-02-09 13:17 guix pack -f docker ... works! dvn
  2018-02-09 14:26 ` Pjotr Prins
@ 2018-02-09 17:08 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2018-02-09 17:08 UTC (permalink / raw)
  To: dvn; +Cc: guix-devel

Hello!

dvn <mail@dvn.me> 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 profile: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 docker container, just have a
> way of installing a few packages -- which is really all we need in containers 99% of the time.

Glad you like it.  :-)

> What have other people done in this direction?

There’s Pjotr’s notes and a couple of blog posts about this:

  https://www.gnu.org/software/guix/blog/2017/creating-bundles-with-guix-pack/

  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/…-profile/etc/profile.  You could
use ‘-S /etc=etc’ but you still have to source /etc/profile
manually—well, except if you run Bash in the container since Bash is
going to source /etc/profile automatically!

We’ve been discussing ways to automate this (when one doesn’t use Bash
in the container), possibly by providing an entry point in the Docker
metadata and things like that.

Thanks for your feedback!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-09 17:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 13:17 guix pack -f docker ... works! dvn
2018-02-09 14:26 ` Pjotr Prins
2018-02-09 17:08 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.