mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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
1 changed files with 13 additions and 12 deletions
|
@ -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)))
|
||||
|
|
Loading…
Reference in a new issue