[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/08: services: docker: Add config-file option.
From: |
guix-commits |
Subject: |
08/08: services: docker: Add config-file option. |
Date: |
Wed, 3 Jan 2024 09:32:33 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit 2f642b602398ab32b18faceecd074f49da92e95e
Author: Connor Clark <connor@psyleft.com>
AuthorDate: Thu Dec 28 23:47:37 2023 -0500
services: docker: Add config-file option.
* gnu/services/docker.scm (docker-configuration)[config-file] Add file-like
field.
* doc/guix.texi (Docker Service): Add information about config-file.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
doc/guix.texi | 3 +++
gnu/services/docker.scm | 12 +++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3002cdfa13..924dbf23ba 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39711,6 +39711,9 @@ This must be a list of strings where each string has
the form
"TMPDIR=/tmp/dockerd")
@end lisp
+@item @code{config-file} (type: maybe-file-like)
+JSON configuration file pass to @command{dockerd}.
+
@end table
@end deftp
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index 72ef7d74db..4d32b96847 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -61,6 +61,8 @@
oci-container-service-type
oci-container-shepherd-service))
+(define-maybe file-like)
+
(define-configuration docker-configuration
(docker
(file-like docker)
@@ -87,6 +89,9 @@ loop-back communications.")
(environment-variables
(list '())
"Environment variables to set for dockerd")
+ (config-file
+ (maybe-file-like)
+ "JSON configuration file to pass to dockerd")
(no-serialization))
(define %docker-accounts
@@ -131,7 +136,8 @@ loop-back communications.")
(enable-iptables? (docker-configuration-enable-iptables? config))
(environment-variables (docker-configuration-environment-variables
config))
(proxy (docker-configuration-proxy config))
- (debug? (docker-configuration-debug? config)))
+ (debug? (docker-configuration-debug? config))
+ (config-file (docker-configuration-config-file config)))
(shepherd-service
(documentation "Docker daemon.")
(provision '(dockerd))
@@ -144,6 +150,10 @@ loop-back communications.")
(start #~(make-forkexec-constructor
(list (string-append #$docker "/bin/dockerd")
"-p" "/var/run/docker.pid"
+ #$@(if (not (eq? config-file %unset-value))
+ (list #~(string-append
+ "--config-file=" #$config-file))
+ '())
#$@(if debug?
'("--debug" "--log-level=debug")
'())
- branch master updated (5312b63ea0 -> 2f642b6023), guix-commits, 2024/01/03
- 02/08: gnu: vulkan-loader: Fix cross-compiling., guix-commits, 2024/01/03
- 03/08: gnu: slurp: Fix cross-compiling., guix-commits, 2024/01/03
- 05/08: gnu: grim: Update to 1.4.1., guix-commits, 2024/01/03
- 01/08: gnu: glew: Fix cross-compiling., guix-commits, 2024/01/03
- 04/08: gnu: slurp: Update to 1.5.0., guix-commits, 2024/01/03
- 06/08: gnu: grim: Fix cross-compiling., guix-commits, 2024/01/03
- 07/08: gnu: libassuan: Fix cross-compiling., guix-commits, 2024/01/03
- 08/08: services: docker: Add config-file option.,
guix-commits <=