(address . guix-patches@gnu.org)
gnu/services/docker.scm (oci-container-shepherd-service): when image is
oci-image, call %oci-image-loader.
Change-Id: I26105e82643affe9e7037975e42ec9690089545b
---
gnu/services/docker.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
Toggle diff (40 lines)
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index 7aff8dcc5f..cc1201508c 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -687,18 +687,19 @@ (define (oci-container-shepherd-service config)
(if (oci-image? image) name image) "."))
(start
#~(lambda ()
- (when #$(oci-image? image)
- (invoke #$(%oci-image-loader
- name image image-reference)))
- (fork+exec-command
- ;; docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
- (list #$docker "run" "--rm" "--name" #$name
- #$@options #$@extra-arguments
- #$image-reference #$@command)
- #:user #$user
- #:group #$group
- #:environment-variables
- (list #$@host-environment))))
+ #$@(if (oci-image? image)
+ #~((invoke #$(%oci-image-loader
+ name image image-reference)))
+ #~())
+ (fork+exec-command
+ ;; docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
+ (list #$docker "run" "--rm" "--name" #$name
+ #$@options #$@extra-arguments
+ #$image-reference #$@command)
+ #:user #$user
+ #:group #$group
+ #:environment-variables
+ (list #$@host-environment))))
(stop
#~(lambda _
(invoke #$docker "rm" "-f" #$name)))
base-commit: 473cdecd8965a301ef6817027090bc61c6907a18
--
2.41.0