diff options
author | Giacomo Leidi via Guix-patches via <guix-patches@gnu.org> | 2024-06-11 22:04:57 +0200 |
---|---|---|
committer | Zheng Junjie <zhengjunjie@iscas.ac.cn> | 2024-07-05 15:12:34 +0800 |
commit | 30ba86cb712e1012708d2bafad21d6b7266f0c6f (patch) | |
tree | 033ddd7eed9043816e11b5ee7f6c74d09e570a0d /gnu/services | |
parent | f5d0c324b1eb1129a70c04487e5f112cb1838f63 (diff) | |
download | guix-30ba86cb712e1012708d2bafad21d6b7266f0c6f.tar.gz guix-30ba86cb712e1012708d2bafad21d6b7266f0c6f.zip |
services: oci-container: Allow setting Shepherd log-file in oci-container-configuration.
* gnu/services/docker.scm (oci-container-configuration)
[log-file]: New field.
(oci-container-shepherd-service): use it.
* doc/guix.texi: Document it.
Change-Id: Icad29ac6342b6f5bafc0d9be13a93cee99674185
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/docker.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index cc1201508c..c256d1601b 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -74,6 +74,7 @@ oci-container-configuration-image oci-container-configuration-provision oci-container-configuration-requirement + oci-container-configuration-log-file oci-container-configuration-network oci-container-configuration-ports oci-container-configuration-volumes @@ -461,6 +462,11 @@ Engine, and follow the usual format (list-of-symbols '()) "Set additional Shepherd services dependencies to the provisioned Shepherd service.") + (log-file + (maybe-string) + "When @code{log-file} is set, it names the file to which the service’s +standard output and standard error are redirected. @code{log-file} is created +if it does not exist, otherwise it is appended to.") (network (maybe-string) "Set a Docker network for the spawned container.") @@ -669,6 +675,7 @@ operating-system, gexp or file-like records but ~a was found") (host-environment (oci-container-configuration-host-environment config)) (command (oci-container-configuration-command config)) + (log-file (oci-container-configuration-log-file config)) (provision (oci-container-configuration-provision config)) (requirement (oci-container-configuration-requirement config)) (image (oci-container-configuration-image config)) @@ -698,6 +705,9 @@ operating-system, gexp or file-like records but ~a was found") #$image-reference #$@command) #:user #$user #:group #$group + #$@(if (maybe-value-set? log-file) + (list #:log-file log-file) + '()) #:environment-variables (list #$@host-environment)))) (stop |