[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/13: services: docker: Add 'environment-variables' configuration field
From: |
guix-commits |
Subject: |
01/13: services: docker: Add 'environment-variables' configuration field. |
Date: |
Wed, 17 Nov 2021 17:07:39 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 4ace6455063297e6de84a9a2477150a6ce9416d8
Author: Alexey Abramov <levenson@mmer.org>
AuthorDate: Thu Nov 4 07:48:09 2021 +0100
services: docker: Add 'environment-variables' configuration field.
* gnu/services/docker.scm (docker-configuration): Add the field
(docker-shepherd-service): Pass the list of defined variables to
make-forkexec-constructor.
* doc/guix.texi (Miscellaneous Services): Update doc.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
doc/guix.texi | 11 +++++++++++
gnu/services/docker.scm | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 89a9709..158261e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -33229,6 +33229,17 @@ Enable or disable debug output.
@item @code{enable-iptables?} (default @code{#t})
Enable or disable the addition of iptables rules.
+@item @code{environment-variables} (default: @code{()})
+List of environment variables to set for @command{dockerd}.
+
+This must be a list of strings where each string has the form
+@samp{@var{key}=@var{value}} as in this example:
+
+@lisp
+(list "LANGUAGE=eo:ca:eu"
+ "TMPDIR=/tmp/dockerd")
+@end lisp
+
@end table
@end deftp
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index ef55148..c4d4867 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -62,6 +62,9 @@ loop-back communications.")
(enable-iptables?
(boolean #t)
"Enable addition of iptables rules (enabled by default).")
+ (environment-variables
+ (list '())
+ "Environment variables to set for dockerd")
(no-serialization))
(define %docker-accounts
@@ -102,6 +105,7 @@ loop-back communications.")
(let* ((docker (docker-configuration-docker config))
(enable-proxy? (docker-configuration-enable-proxy? config))
(enable-iptables? (docker-configuration-enable-iptables? config))
+ (environment-variables (docker-configuration-environment-variables
config))
(proxy (docker-configuration-proxy config))
(debug? (docker-configuration-debug? config)))
(shepherd-service
@@ -132,6 +136,8 @@ loop-back communications.")
(if #$enable-iptables?
"--iptables"
"--iptables=false"))
+ #:environment-variables
+ (list #$@environment-variables)
#:pid-file "/var/run/docker.pid"
#:log-file "/var/log/docker.log"))
(stop #~(make-kill-destructor)))))
- branch master updated (6bffa13 -> 94fbcf7), guix-commits, 2021/11/17
- 01/13: services: docker: Add 'environment-variables' configuration field.,
guix-commits <=
- 02/13: gnu: perl-inline-c: Patch paths to ‘make’., guix-commits, 2021/11/17
- 03/13: gnu: shellcheck: Update to 0.8.0., guix-commits, 2021/11/17
- 05/13: gnu: ristretto: Update to 0.12.0., guix-commits, 2021/11/17
- 06/13: gnu: xfce4-whiskermenu-plugin: Update to 2.6.1., guix-commits, 2021/11/17
- 08/13: gnu: tidy-html: Update to 5.8.0., guix-commits, 2021/11/17
- 04/13: gnu: xfce4-cpugraph-plugin: Update to 1.2.5., guix-commits, 2021/11/17
- 09/13: doc: Improve wording for param spec of `./configure`., guix-commits, 2021/11/17
- 10/13: diagnostics: Add syntax to capture arguments' syntax-properties., guix-commits, 2021/11/17
- 11/13: gnu: system: Improve location of some configuration warnings., guix-commits, 2021/11/17
- 07/13: scripts: home: Make ‘guix home import’ write home-configuration.scm., guix-commits, 2021/11/17