unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Declarative Guix Containers
@ 2023-02-12 21:39 Benton Edmondson
  2023-02-14 12:02 ` Simon Tournier
  0 siblings, 1 reply; 2+ messages in thread
From: Benton Edmondson @ 2023-02-12 21:39 UTC (permalink / raw)
  To: help-guix

Hello,

I see under <https://guix.gnu.org/cookbook/en/html_node/Guix-Containers.html>
that it is possible to imperatively run programs in their own container. Is
it possible to do this declaratively? In other words, can I create a
derivation which generates a Guix Container, which I could then put in a
manifest? I read around but didn't see documentation on this.

Thanks,
Benton

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Declarative Guix Containers
  2023-02-12 21:39 Declarative Guix Containers Benton Edmondson
@ 2023-02-14 12:02 ` Simon Tournier
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Tournier @ 2023-02-14 12:02 UTC (permalink / raw)
  To: Benton Edmondson, help-guix

Hi,

On dim., 12 févr. 2023 at 16:39, Benton Edmondson <benton@umich.edu> wrote:
> Hello,
>
> I see under <https://guix.gnu.org/cookbook/en/html_node/Guix-Containers.html>
> that it is possible to imperatively run programs in their own container. Is
> it possible to do this declaratively? In other words, can I create a
> derivation which generates a Guix Container, which I could then put in a
> manifest? I read around but didn't see documentation on this.

This example from the mentioned Cookbook,

  $ guix shell --container --network --manifest=manifest.scm -- R

is declarative, no?  Well, the profile is not “containerized”,

--8<---------------cut here---------------start------------->8---
$ guix shell hello coreutils
(env) $ echo $GUIX_ENVIRONMENT
/gnu/store/d5pz9lmmi9zr7l6zpj6z6708vsrwwv29-profile

$ guix shell hello coreutils --container
[env]$ echo $GUIX_ENVIRONMENT
/gnu/store/d5pz9lmmi9zr7l6zpj6z6708vsrwwv29-profile
--8<---------------cut here---------------end--------------->8---

and the container is created on the fly, then populated by the profile.
You are asking for another feature, IIUC, as described previously in
[1,2] and I guess you would like [3]. :-)

1: https://yhetil.org/guix/87zhphft98.fsf_-_@gnu.org
2: https://yhetil.org/guix/877dvn10ro.fsf@dustycloud.org
3: https://yhetil.org/guix/87fu6olig0.fsf@gnu.org

Or maybe you could be interested by:

https://guix.gnu.org/en/blog/2017/running-system-services-in-containers/


Cheers,
simon


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-14 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 21:39 Declarative Guix Containers Benton Edmondson
2023-02-14 12:02 ` Simon Tournier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).