[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guix docker on gitlab-ci
From: |
Graham Addis |
Subject: |
guix docker on gitlab-ci |
Date: |
Wed, 24 May 2023 18:04:47 +0100 |
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
- guix docker on gitlab-ci,
Graham Addis <=