all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Graham Addis <grahamjamesaddis@gmail.com>
To: Help-Guix@gnu.org
Subject: guix docker on gitlab-ci
Date: Wed, 24 May 2023 18:04:47 +0100	[thread overview]
Message-ID: <CAA4DTexuEsUW2ywicKT63pYbeXh7-D0+pFnww9Kk3p8dTGmGzw@mail.gmail.com> (raw)

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


             reply	other threads:[~2023-05-29 15:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 17:04 Graham Addis [this message]
2023-05-29 19:41 ` guix docker on gitlab-ci 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA4DTexuEsUW2ywicKT63pYbeXh7-D0+pFnww9Kk3p8dTGmGzw@mail.gmail.com \
    --to=grahamjamesaddis@gmail.com \
    --cc=Help-Guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.