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: Icad29ac6342b6f5bafc0d9be13a93cee99674185master
parent
f5d0c324b1
commit
30ba86cb71
|
@ -40885,6 +40885,11 @@ Set the name of the provisioned Shepherd service.
|
||||||
Set additional Shepherd services dependencies to the provisioned
|
Set additional Shepherd services dependencies to the provisioned
|
||||||
Shepherd service.
|
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)
|
@item @code{network} (default: @code{""}) (type: string)
|
||||||
Set a Docker network for the spawned container.
|
Set a Docker network for the spawned container.
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
oci-container-configuration-image
|
oci-container-configuration-image
|
||||||
oci-container-configuration-provision
|
oci-container-configuration-provision
|
||||||
oci-container-configuration-requirement
|
oci-container-configuration-requirement
|
||||||
|
oci-container-configuration-log-file
|
||||||
oci-container-configuration-network
|
oci-container-configuration-network
|
||||||
oci-container-configuration-ports
|
oci-container-configuration-ports
|
||||||
oci-container-configuration-volumes
|
oci-container-configuration-volumes
|
||||||
|
@ -461,6 +462,11 @@ Engine, and follow the usual format
|
||||||
(list-of-symbols '())
|
(list-of-symbols '())
|
||||||
"Set additional Shepherd services dependencies to the provisioned Shepherd
|
"Set additional Shepherd services dependencies to the provisioned Shepherd
|
||||||
service.")
|
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
|
(network
|
||||||
(maybe-string)
|
(maybe-string)
|
||||||
"Set a Docker network for the spawned container.")
|
"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
|
(host-environment
|
||||||
(oci-container-configuration-host-environment config))
|
(oci-container-configuration-host-environment config))
|
||||||
(command (oci-container-configuration-command config))
|
(command (oci-container-configuration-command config))
|
||||||
|
(log-file (oci-container-configuration-log-file config))
|
||||||
(provision (oci-container-configuration-provision config))
|
(provision (oci-container-configuration-provision config))
|
||||||
(requirement (oci-container-configuration-requirement config))
|
(requirement (oci-container-configuration-requirement config))
|
||||||
(image (oci-container-configuration-image 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)
|
#$image-reference #$@command)
|
||||||
#:user #$user
|
#:user #$user
|
||||||
#:group #$group
|
#:group #$group
|
||||||
|
#$@(if (maybe-value-set? log-file)
|
||||||
|
(list #:log-file log-file)
|
||||||
|
'())
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
(list #$@host-environment))))
|
(list #$@host-environment))))
|
||||||
(stop
|
(stop
|
||||||
|
|
Reference in New Issue