mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
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>
This commit is contained in:
parent
c880652fec
commit
2f642b6023
2 changed files with 14 additions and 1 deletions
|
@ -39711,6 +39711,9 @@ This must be a list of strings where each string has the form
|
||||||
"TMPDIR=/tmp/dockerd")
|
"TMPDIR=/tmp/dockerd")
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
@item @code{config-file} (type: maybe-file-like)
|
||||||
|
JSON configuration file pass to @command{dockerd}.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,8 @@ (define-module (gnu services docker)
|
||||||
oci-container-service-type
|
oci-container-service-type
|
||||||
oci-container-shepherd-service))
|
oci-container-shepherd-service))
|
||||||
|
|
||||||
|
(define-maybe file-like)
|
||||||
|
|
||||||
(define-configuration docker-configuration
|
(define-configuration docker-configuration
|
||||||
(docker
|
(docker
|
||||||
(file-like docker)
|
(file-like docker)
|
||||||
|
@ -87,6 +89,9 @@ (define-configuration docker-configuration
|
||||||
(environment-variables
|
(environment-variables
|
||||||
(list '())
|
(list '())
|
||||||
"Environment variables to set for dockerd")
|
"Environment variables to set for dockerd")
|
||||||
|
(config-file
|
||||||
|
(maybe-file-like)
|
||||||
|
"JSON configuration file to pass to dockerd")
|
||||||
(no-serialization))
|
(no-serialization))
|
||||||
|
|
||||||
(define %docker-accounts
|
(define %docker-accounts
|
||||||
|
@ -131,7 +136,8 @@ (define (docker-shepherd-service config)
|
||||||
(enable-iptables? (docker-configuration-enable-iptables? config))
|
(enable-iptables? (docker-configuration-enable-iptables? config))
|
||||||
(environment-variables (docker-configuration-environment-variables config))
|
(environment-variables (docker-configuration-environment-variables config))
|
||||||
(proxy (docker-configuration-proxy 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
|
(shepherd-service
|
||||||
(documentation "Docker daemon.")
|
(documentation "Docker daemon.")
|
||||||
(provision '(dockerd))
|
(provision '(dockerd))
|
||||||
|
@ -144,6 +150,10 @@ (define (docker-shepherd-service config)
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list (string-append #$docker "/bin/dockerd")
|
(list (string-append #$docker "/bin/dockerd")
|
||||||
"-p" "/var/run/docker.pid"
|
"-p" "/var/run/docker.pid"
|
||||||
|
#$@(if (not (eq? config-file %unset-value))
|
||||||
|
(list #~(string-append
|
||||||
|
"--config-file=" #$config-file))
|
||||||
|
'())
|
||||||
#$@(if debug?
|
#$@(if debug?
|
||||||
'("--debug" "--log-level=debug")
|
'("--debug" "--log-level=debug")
|
||||||
'())
|
'())
|
||||||
|
|
Loading…
Reference in a new issue