diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/docker.scm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 7aff8dcc5fe..cc1201508c4 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -687,18 +687,19 @@ operating-system, gexp or file-like records but ~a was found") (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))) |