unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* guix pack -f docker and profile ?
@ 2019-05-16 18:26 zimoun
  2019-05-19 14:38 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2019-05-16 18:26 UTC (permalink / raw)
  To: help-guix

Dear,

The command line:

  guix pack                 \
            -f docker       \
            -C none         \
            -S /bin=bin     \
            -S /lib=lib     \
            -S /share=share \
            -S /etc=etc     \
            glibc-utf8-locales coreutils tzdata \
            bash r r-<name-it>

creates a Docker image containing the R interpreter and the R package
<name-it>. Nice!

Then:
  docker run -ti --rm --tmpfs /tmp <image-id> R
launches R inside the Docker. Cool!

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>)'


Is it possible to directly have the profile under /etc/ ?
Other said, how to correctly expose the environment variables ?


Thank you in advance.


All the best,
simon

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

end of thread, other threads:[~2019-05-20 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).