aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi5
-rw-r--r--gnu/services/docker.scm10
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 9050888b93..15ddbff9fa 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -40885,6 +40885,11 @@ Set the name of the provisioned Shepherd service.
Set additional Shepherd services dependencies to the provisioned
Shepherd service.
+@item @code{log-file} (type: 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.
+
@item @code{network} (default: @code{""}) (type: string)
Set a Docker network for the spawned container.
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