[Top][All Lists]

[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


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!

  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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]