* [bug#41041] [PATCH] doc: Add container example to run a web browser. @ 2020-05-03 8:12 Pierre Neidhardt 2020-05-07 7:42 ` Ludovic Courtès 2020-05-07 8:02 ` Caleb Ristvedt 0 siblings, 2 replies; 6+ messages in thread From: Pierre Neidhardt @ 2020-05-03 8:12 UTC (permalink / raw) To: 41041 * 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. --- doc/guix.texi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index d5d8662937..3c31386036 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4786,6 +4786,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 @@ -4802,6 +4803,23 @@ 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 use +@code{env} from the @code{coreutils} package to set the @code{DISPLAY} +environment variable since containerized graphical applications won't +display without it. + +@example +guix environment --container --network --expose=/etc/machine-id \ + --expose=/etc/ssl/certs/ \ + --share=$HOME/.local/share/eolie/=$HOME/.local/share/eolie/ \ + --ad-hoc eolie coreutils nss-certs dbus -- \ + env DISPLAY=$DISPLAY eolie +@end example + The available options are summarized below. @table @code -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#41041] [PATCH] doc: Add container example to run a web browser. 2020-05-03 8:12 [bug#41041] [PATCH] doc: Add container example to run a web browser Pierre Neidhardt @ 2020-05-07 7:42 ` Ludovic Courtès 2020-05-07 7:47 ` Pierre Neidhardt 2020-05-07 8:02 ` Caleb Ristvedt 1 sibling, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2020-05-07 7:42 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 41041 Hi, Pierre Neidhardt <mail@ambrevar.xyz> skribis: > * 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. Good idea! > +@example > +guix environment --container --network --expose=/etc/machine-id \ > + --expose=/etc/ssl/certs/ \ > + --share=$HOME/.local/share/eolie/=$HOME/.local/share/eolie/ \ > + --ad-hoc eolie coreutils nss-certs dbus -- \ > + env DISPLAY=$DISPLAY eolie Instead of ‘env’, you can preserve the ‘DISPLAY’ variable with: guix environment -E ^DISPLAY$ … which in turn allows you to remove ‘coreutils’, maybe. Otherwise LGTM! Thanks, Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41041] [PATCH] doc: Add container example to run a web browser. 2020-05-07 7:42 ` Ludovic Courtès @ 2020-05-07 7:47 ` Pierre Neidhardt 2020-05-07 8:05 ` Pierre Neidhardt 0 siblings, 1 reply; 6+ messages in thread From: Pierre Neidhardt @ 2020-05-07 7:47 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 41041 [-- Attachment #1: Type: text/plain, Size: 428 bytes --] Ludovic Courtès <ludo@gnu.org> writes: > Instead of ‘env’, you can preserve the ‘DISPLAY’ variable with: > > guix environment -E ^DISPLAY$ … > > which in turn allows you to remove ‘coreutils’, maybe. Good tip, thanks! It's strange that I've seen this "coreutils + env" trick so many times around. I guess we really lacked examples like this one :) -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41041] [PATCH] doc: Add container example to run a web browser. 2020-05-07 7:47 ` Pierre Neidhardt @ 2020-05-07 8:05 ` Pierre Neidhardt 0 siblings, 0 replies; 6+ messages in thread From: Pierre Neidhardt @ 2020-05-07 8:05 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 41041 [-- Attachment #1: Type: text/plain, Size: 103 bytes --] Merged with 60131df02b521235a311031f9410f530ded60f33. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41041] [PATCH] doc: Add container example to run a web browser. 2020-05-03 8:12 [bug#41041] [PATCH] doc: Add container example to run a web browser Pierre Neidhardt 2020-05-07 7:42 ` Ludovic Courtès @ 2020-05-07 8:02 ` Caleb Ristvedt 2020-05-07 8:38 ` Pierre Neidhardt 1 sibling, 1 reply; 6+ messages in thread From: Caleb Ristvedt @ 2020-05-07 8:02 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 41041 [-- Attachment #1: Type: text/plain, Size: 218 bytes --] Pierre Neidhardt <mail@ambrevar.xyz> writes: > +share some files and directories; we include @code{nss-certs} and expose > +@file{/etc/sll/certs/} for HTTPS authentication; finally we use Typo: sll --> ssl - reepca [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41041] [PATCH] doc: Add container example to run a web browser. 2020-05-07 8:02 ` Caleb Ristvedt @ 2020-05-07 8:38 ` Pierre Neidhardt 0 siblings, 0 replies; 6+ messages in thread From: Pierre Neidhardt @ 2020-05-07 8:38 UTC (permalink / raw) To: Caleb Ristvedt; +Cc: 41041 [-- Attachment #1: Type: text/plain, Size: 82 bytes --] Good catch! I've just fixed it. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-07 8:40 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-05-03 8:12 [bug#41041] [PATCH] doc: Add container example to run a web browser Pierre Neidhardt 2020-05-07 7:42 ` Ludovic Courtès 2020-05-07 7:47 ` Pierre Neidhardt 2020-05-07 8:05 ` Pierre Neidhardt 2020-05-07 8:02 ` Caleb Ristvedt 2020-05-07 8:38 ` Pierre Neidhardt
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.