unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Benton Edmondson <benton@umich.edu>, help-guix@gnu.org
Subject: Re: Declarative Guix Containers
Date: Tue, 14 Feb 2023 13:02:25 +0100	[thread overview]
Message-ID: <87bklw1mlq.fsf@gmail.com> (raw)
In-Reply-To: <CABonxi2_QbG=SDPD9ogLDY8kiKZnXAJrfhFF7mMWpS8zDjrokQ@mail.gmail.com>

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


      reply	other threads:[~2023-02-14 12:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 21:39 Declarative Guix Containers Benton Edmondson
2023-02-14 12:02 ` Simon Tournier [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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bklw1mlq.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=benton@umich.edu \
    --cc=help-guix@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.
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).