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 (guess-name name image) (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)))