unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Is anyone using `guix system container` in production?
@ 2020-07-29 22:17 conjaroy
  2020-08-02  8:34 ` Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: conjaroy @ 2020-07-29 22:17 UTC (permalink / raw)
  To: help-guix

I'm interested in deploying several system containers to a single cloud
VPS, and I had originally planned to build those via `guix system
docker-image`. Although Docker has some nice CLI tools for
starting/stopping/listing active containers, it occurs to me that an
alternative (`guix system container`) has at least one significant
advantage: containers come online in seconds, as opposed to the minutes it
takes to build and import a Docker image (or tens of minutes, if the build
host is a VM without /dev/kvm.) It might also be the case that using
/gnu/store for all containers is more disk-space-efficient than creating
self-contained Docker images for each one.

So I was wondering if anyone has experience running long-lived containers
built via `guix system container` in a production setting. Since I'm
running Guix on a foreign distro (Debian 10), it seems reasonable to build
a systemd service around the container script, but there may be pitfalls I
haven't considered:

# build container script and register it as a gc root with a well-known
name.
guix build --root=/home/guix/my-awesome-container $(guix system container
-d my-awesome-container.scm)

cat << EOF > /etc/systemd/system/my-awesome-container.service
[Unit]
Description=My Awesome Container

[Service]
ExecStart=/home/guix/my-awesome-container
TimeoutStopSec=30
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target
EOF

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

end of thread, other threads:[~2020-08-04 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 22:17 Is anyone using `guix system container` in production? conjaroy
2020-08-02  8:34 ` Efraim Flashner
2020-08-02 15:40   ` conjaroy
2020-08-03  6:53     ` Efraim Flashner
2020-08-04 12:40       ` conjaroy

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).