all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: guix pack -f docker and profile ?
Date: Mon, 20 May 2019 15:15:41 +0200	[thread overview]
Message-ID: <CAJ3okZ0ijtJx=5DRG=i1gNpz14dw+DSt-LSShVg-Ss_zgoW+6Q@mail.gmail.com> (raw)
In-Reply-To: <87a7fitsov.fsf@gnu.org>

Hi Ludo,

On Sun, 19 May 2019 at 16:38, Ludovic Courtès <ludo@gnu.org> wrote:
>
> Hello Simon!
>
> zimoun <zimon.toutoune@gmail.com> skribis:
>
> > However you cannot load the R package <name-it> because it is not in
> > the load path. Which is annoying but expected.
> >
> > Instead, one needs to make it with 2 steps:
> >   docker run -ti --rm --tmpfs /tmp <image-id> bash
> > then find the <hash> from the folder /gnu/store/<hash>-profile to be
> > able to source it:
> >   source /gnu/store/<hash>-profile/etc/profile
> >
> > Now the R library is found:
> >   R -e 'library(<name-it>)'
>
> By using ‘-S /etc=etc’, you provide /etc/profile in the container.
> Thus, if you run “bash” (or “bash --login”?) in there, /etc/profile is
> automatically sourced, which solves the problem, I think.

This was my expectation by using `-S /etc=etc` but I am not sure it
works. Or I miss something.

For example, I run:

 docker run -ti --rm --tmpfs /tmp 6d1dfcc93a87 bash --login

or without --login. Then nothing "useful" is sourced.

Moreover, `ls -al /etc/` returns:
total 20
drwxr-xr-x 2 0 0 4096 May 20 13:01 .
drwxr-xr-x 1 0 0 4096 May 20 13:01 ..
-rw-r--r-- 1 0 0   13 May 20 13:01 hostname
-rw-r--r-- 1 0 0  174 May 20 13:01 hosts
lrwxrwxrwx 1 0 0   12 May 20 13:01 mtab -> /proc/mounts
-rw-r--r-- 1 0 0  111 May 20 13:01 resolv.conf

I mean the profile is still under for example
`/gnu/store/n8sfl91mk8xrcrl325lc46ajihjssi8d-profile/etc/profile` and
it is really annoying to find the hash.

Maybe I miss something.
For the record, I am working on a foreign distro.

> But it’s not very convenient.
>
> > Is it possible to directly have the profile under /etc/ ?
> > Other said, how to correctly expose the environment variables ?
>
> Perhaps we should populate the ‘Environment’ bit of the Docker manifest
> file?  It sounds like it would greatly improve things.

I am not sure it will fix the issue here. However, it should improve
things for the issues described there:
https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00326.html
(if I understand what a Docker mainifest file is)



All the best,
simon

      reply	other threads:[~2019-05-20 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 18:26 guix pack -f docker and profile ? zimoun
2019-05-19 14:38 ` Ludovic Courtès
2019-05-20 13:15   ` zimoun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ3okZ0ijtJx=5DRG=i1gNpz14dw+DSt-LSShVg-Ss_zgoW+6Q@mail.gmail.com' \
    --to=zimon.toutoune@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.