From: zimoun <zimon.toutoune@gmail.com>
To: help-guix <help-guix@gnu.org>
Subject: guix pack -f docker and profile ?
Date: Thu, 16 May 2019 20:26:41 +0200 [thread overview]
Message-ID: <CAJ3okZ1=SehT3FGWN1PNYmfUi-ktSw3vFOSbXFLg+oTr+U_-OQ@mail.gmail.com> (raw)
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
next reply other threads:[~2019-05-16 18:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-16 18:26 zimoun [this message]
2019-05-19 14:38 ` guix pack -f docker and profile ? Ludovic Courtès
2019-05-20 13:15 ` zimoun
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ3okZ1=SehT3FGWN1PNYmfUi-ktSw3vFOSbXFLg+oTr+U_-OQ@mail.gmail.com' \
--to=zimon.toutoune@gmail.com \
--cc=help-guix@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.
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).