[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Declarative Guix Containers
From: |
Simon Tournier |
Subject: |
Re: Declarative Guix Containers |
Date: |
Tue, 14 Feb 2023 13:02:25 +0100 |
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