mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
pack: Add '--entry-point'.
* guix/scripts/pack.scm (self-contained-tarball): Add #:entry-point and warn when it's true. (squashfs-image): Add #:entry-point and honor it. (docker-image): Add #:entry-point and honor it. (%options, show-help): Add '--entry-point'. (guix-pack): Honor '--entry-point' and pass #:entry-point to BUILD-IMAGE. * gnu/tests/docker.scm (run-docker-test): Test 'docker run' with the default entry point. (build-tarball&run-docker-test): Pass #:entry-point to 'docker-image'. * doc/guix.texi (Invoking guix pack): Document it. * gnu/tests/singularity.scm (run-singularity-test)["singularity run"]: New test. (build-tarball&run-singularity-test): Pass #:entry-point to 'squashfs-image'.
This commit is contained in:
parent
08814aec6a
commit
a0f352b30f
4 changed files with 85 additions and 7 deletions
|
@ -101,7 +101,7 @@ inside %DOCKER-OS."
|
|||
marionette))
|
||||
|
||||
(test-equal "Load docker image and run it"
|
||||
"hello world"
|
||||
'("hello world" "hi!")
|
||||
(marionette-eval
|
||||
`(begin
|
||||
(define slurp
|
||||
|
@ -117,12 +117,16 @@ inside %DOCKER-OS."
|
|||
(repository&tag (string-drop raw-line
|
||||
(string-length
|
||||
"Loaded image: ")))
|
||||
(response (slurp
|
||||
,(string-append #$docker-cli "/bin/docker")
|
||||
"run" "--entrypoint" "bin/Guile"
|
||||
repository&tag
|
||||
"/aa.scm")))
|
||||
response))
|
||||
(response1 (slurp
|
||||
,(string-append #$docker-cli "/bin/docker")
|
||||
"run" "--entrypoint" "bin/Guile"
|
||||
repository&tag
|
||||
"/aa.scm"))
|
||||
(response2 (slurp ;default entry point
|
||||
,(string-append #$docker-cli "/bin/docker")
|
||||
"run" repository&tag
|
||||
"-c" "(display \"hi!\")")))
|
||||
(list response1 response2)))
|
||||
marionette))
|
||||
|
||||
(test-end)
|
||||
|
@ -161,6 +165,7 @@ standard output device and then enters a new line.")
|
|||
(tarball (docker-image "docker-pack" profile
|
||||
#:symlinks '(("/bin/Guile" -> "bin/guile")
|
||||
("aa.scm" -> "a.scm"))
|
||||
#:entry-point "bin/guile"
|
||||
#:localstatedir? #t)))
|
||||
(run-docker-test tarball)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue