summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2020-05-03 10:08:56 +0200
committerPierre Neidhardt <mail@ambrevar.xyz>2020-05-07 10:04:14 +0200
commit60131df02b521235a311031f9410f530ded60f33 (patch)
tree848cc4628ff94a1a622a9155ff824605bb9cb770 /doc
parente5f1f5ce07f0976241ed1a68b952b40876eeafba (diff)
downloadguix-60131df02b521235a311031f9410f530ded60f33.tar.gz
doc: Add container example to run a web browser.
* doc/guix.texi (Invoking `guix environment'): Add paragraph and example to
  run Eolie in a guix environment container.  Add `container' cindex for the
  first container example, and the `certificates' cindex for the web browser
  example.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index bc5ecbbcde..ffef097dba 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4777,6 +4777,7 @@ additionally includes Git and strace:
 guix environment --pure guix --ad-hoc git strace
 @end example
 
+@cindex container
 Sometimes it is desirable to isolate the environment as much as
 possible, for maximal purity and reproducibility.  In particular, when
 using Guix on a host distro that is not Guix System, it is desirable to
@@ -4793,6 +4794,22 @@ guix environment --ad-hoc --container guile -- guile
 The @code{--container} option requires Linux-libre 3.19 or newer.
 @end quotation
 
+@cindex certificates
+Another typical use case for containers is to run security-sensitive
+applications such as a web browser.  To run Eolie, we must expose and
+share some files and directories; we include @code{nss-certs} and expose
+@file{/etc/sll/certs/} for HTTPS authentication; finally we preserve the
+the @code{DISPLAY} environment variable since containerized graphical
+applications won't display without it.
+
+@example
+guix environment --preserve='^DISPLAY$' --container --network \
+  --expose=/etc/machine-id \
+  --expose=/etc/ssl/certs/ \
+  --share=$HOME/.local/share/eolie/=$HOME/.local/share/eolie/ \
+  --ad-hoc eolie nss-certs dbus --  eolie
+@end example
+
 The available options are summarized below.
 
 @table @code