unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: alex.sassmannshausen@gmail.com
Cc: help-guix <help-guix@gnu.org>
Subject: Re: A few questions about guix containers
Date: Sat, 11 May 2019 23:25:16 +0100	[thread overview]
Message-ID: <87y33cmxwz.fsf@cbaines.net> (raw)
In-Reply-To: <87sgtlxea3.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]


Alex Sassmannshausen <alex.sassmannshausen@gmail.com> writes:

> Hello,
>
> I'm trying to get to grips with Guix's container support.
>
> Specifically, I can create containerised system using
> $ guix system container /path/to/sysconf.scm
>
> I should then be able to run commands in that container using
> $ guix container exec PID CMD
>
> But here's the rub: how do I find the PID of the container launched
> using 'guix system container'?

I usually use htop or pgrep. I've been thinking recently about getting
the script that launches the container to write the PID out somewhere,
although I think you could also achieve this by sharing a directory
between the container and the host system, and having a process in the
container create a file in that directory. Then you could maybe use the
PID that owns that shared file...

> Also, I can relatively straight forwardly map network ports to guix
> systems using
> $ guix system vm /path/to/sysconf.scm
> and qemu's -net user,hostfwd syntax
>
> Can I achieve similar mappings using 'guix system container'?
>
> Is anyone using containers to test complex networked services in system
> configurations?

So I've been using guix system container with some success for a while
now, but I've been relying on this old patch I wrote to add shared
network support, in the same way that guix environment can do it [1]

1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28128

I haven't given it enough attention, but recently Arun Isaac looks to
have picked it up, so I'm hopeful that this functionality might be more
widely available soon.

One thing I'd love to see in this area is to be able to do networking
similar to how libvirt/virt-manager does it. You can manage virtual
networks there, and I'm not knowledgeable enough about networking to
know what exactly it's doing, but I'd love to be able to run a
container, and have it's network namespace it on a separate IP address
on a virtual network. This would avoid port conflict problems with
sharing localhost with the host system.

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

  reply	other threads:[~2019-05-11 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-11 14:21 A few questions about guix containers Alex Sassmannshausen
2019-05-11 22:25 ` Christopher Baines [this message]
2019-05-27 12:52   ` Alex Sassmannshausen
2019-05-28 18:38     ` Christopher Baines
2019-05-28  5:53   ` Arun Isaac
2019-05-28 10:14     ` Alex Sassmannshausen

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=87y33cmxwz.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=alex.sassmannshausen@gmail.com \
    --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).