[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guix pack -f docker and profile ?
From: |
zimoun |
Subject: |
guix pack -f docker and profile ? |
Date: |
Thu, 16 May 2019 20:26:41 +0200 |
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
- guix pack -f docker and profile ?,
zimoun <=