From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: guix pack -f docker and profile ? Date: Mon, 20 May 2019 15:15:41 +0200 Message-ID: References: <87a7fitsov.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:51733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSi8z-0006Au-JS for help-guix@gnu.org; Mon, 20 May 2019 09:15:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSi8y-00058x-Iq for help-guix@gnu.org; Mon, 20 May 2019 09:15:57 -0400 In-Reply-To: <87a7fitsov.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: help-guix Hi Ludo, On Sun, 19 May 2019 at 16:38, Ludovic Court=C3=A8s wrote: > > Hello Simon! > > zimoun skribis: > > > However you cannot load the R package 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 bash > > then find the from the folder /gnu/store/-profile to be > > able to source it: > > source /gnu/store/-profile/etc/profile > > > > Now the R library is found: > > R -e 'library()' > > By using =E2=80=98-S /etc=3Detc=E2=80=99, you provide /etc/profile in the= container. > Thus, if you run =E2=80=9Cbash=E2=80=9D (or =E2=80=9Cbash --login=E2=80= =9D?) in there, /etc/profile is > automatically sourced, which solves the problem, I think. This was my expectation by using `-S /etc=3Detc` but I am not sure it works. Or I miss something. For example, I run: docker run -ti --rm --tmpfs /tmp 6d1dfcc93a87 bash --login or without --login. Then nothing "useful" is sourced. Moreover, `ls -al /etc/` returns: total 20 drwxr-xr-x 2 0 0 4096 May 20 13:01 . drwxr-xr-x 1 0 0 4096 May 20 13:01 .. -rw-r--r-- 1 0 0 13 May 20 13:01 hostname -rw-r--r-- 1 0 0 174 May 20 13:01 hosts lrwxrwxrwx 1 0 0 12 May 20 13:01 mtab -> /proc/mounts -rw-r--r-- 1 0 0 111 May 20 13:01 resolv.conf I mean the profile is still under for example `/gnu/store/n8sfl91mk8xrcrl325lc46ajihjssi8d-profile/etc/profile` and it is really annoying to find the hash. Maybe I miss something. For the record, I am working on a foreign distro. > But it=E2=80=99s 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 =E2=80=98Environment=E2=80=99 bit of the D= ocker manifest > file? It sounds like it would greatly improve things. I am not sure it will fix the issue here. However, it should improve things for the issues described there: https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00326.html (if I understand what a Docker mainifest file is) All the best, simon