From: Mathieu Lirzin <mthl@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: help-guix@gnu.org
Subject: Re: ‘guix pack’ automatic environment for Docker format
Date: Thu, 15 Feb 2018 21:17:19 +0100 [thread overview]
Message-ID: <87y3ju80ts.fsf@gnu.org> (raw)
In-Reply-To: <87d1168fn9.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 15 Feb 2018 15:57:14 +0100")
Hello,
ludo@gnu.org (Ludovic Courtès) writes:
> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> in order for the compilation environment to be fully ready I need to
>> source the /gnu/store...-profile/etc/profile for things like
>> CMAKE_PREFIX_PATH, LIBRARY_PATH, ...
>>
>> While one obvious available solution is to add an extra symlink ‘-S
>> /etc/profile=etc/profile’ and then source it manually.
>
> Actually, if you also do ‘-S /bin/bash=bin/bash’ and then run /bin/bash
> in the environment, Bash will source /etc/profile. That should be a
> good short-term solution.
Yes it works fine when you add the ‘--login’ option when calling bash
$ docker run -it IMAGE_ID /bin/bash --login
>> I was thinking that maybe 'guix pack -f docker' could set the ‘Env’
>> part in the ‘config.json’ [1] with the appriopriate environment
>> variables automatically.
>>
>> I would like to know if it would be a good idea, and if it is easily
>> doable?
>
> It’s definitely a good idea, and I think it wouldn’t be hard to do.
> Essentially, you’d have to follow the same approach as the one used for
> etc/profile creation in (guix profiles). See ‘profile-derivation’ as
> well as ‘build-etc/profile’ in (guix build profiles).
Great, I will see if I can do something.
Thanks for the feedback.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
prev parent reply other threads:[~2018-02-15 20:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 23:19 ‘guix pack’ automatic environment for Docker format Mathieu Lirzin
2018-02-15 14:57 ` Ludovic Courtès
2018-02-15 20:17 ` Mathieu Lirzin [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3ju80ts.fsf@gnu.org \
--to=mthl@gnu.org \
--cc=help-guix@gnu.org \
--cc=ludo@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.