Hello Simon!

zimoun <zimon.touto...@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.

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.

WDYT?

Thanks,
Ludo’.

Reply via email to