all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guix docker on gitlab-ci
@ 2023-05-24 17:04 Graham Addis
  2023-05-29 19:41 ` wolf
  0 siblings, 1 reply; 13+ messages in thread
From: Graham Addis @ 2023-05-24 17:04 UTC (permalink / raw)
  To: Help-Guix

Dear people,

I tried to create a docker image to use in a gitlab-ci instance but it
failed because I couldn't use --entry-point="bin/sh -l -c" or
equivalent, basically the gitlab-runner complains that it can't run
binaries.

I've managed to get it working by making some changes to guix/scripts/pack.scm

Adding a fn in docker-image, just before the call to
build-docker-image, to create a list from the string passed in from
--entry-point="bin/sh -l -c"

            (define (make-docker-exec-form prefix value)
              (cond
               ((equal? value '())
                '())
               ((equal? prefix '())
                (string-split value #\space))
               (else
                (let ((values (string-split value #\space)))
                  (cons
                   (string-append prefix "/" (car values))
                   (cdr values))))))

And replacing the setting of entry-point in the build-docker-image call to:

                                #:entry-point (make-docker-exec-form
#$profile #$entry-point)

The call to build-docker-image takes a list for entry-point, and it
all works fine as far as I can tell.

Before I send in a patch, some questions:

Am I missing something?

Am I on the right track?

Should I be splitting this out before the call to docker-image?

Thanks,

Graham


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-06-19 15:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24 17:04 guix docker on gitlab-ci Graham Addis
2023-05-29 19:41 ` wolf
2023-05-30  6:52   ` Graham Addis
2023-05-31 17:47     ` Graham Addis
2023-06-01 21:55       ` wolf
2023-06-02  8:13         ` Graham Addis
2023-06-05 15:37           ` Graham Addis
2023-06-05 17:35             ` wolf
2023-06-05 21:38               ` Graham Addis
2023-06-13 16:56                 ` Graham Addis
2023-06-19 15:54                   ` Graham Addis
2023-06-01 22:04     ` wolf
2023-06-02  8:06       ` Graham Addis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.