services: oci-container: Fix provided image is string.
gnu/services/docker.scm (oci-container-shepherd-service): When image is oci-image, call %oci-image-loader. Change-Id: I26105e82643affe9e7037975e42ec9690089545b
This commit is contained in:
parent
425cf1fbe2
commit
2b2337f275
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user