From: Simon Josefsson via <help-guix@gnu.org>
To: help-guix@gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
suhail@bayesians.ca, "Cayetano Santos" <csantosb@inventati.org>
Subject: Re: Container image entrypoints on Gitlab
Date: Wed, 25 Dec 2024 19:13:39 +0100 [thread overview]
Message-ID: <87ikr7ocks.fsf@kaka.sjd.se> (raw)
In-Reply-To: <87frmes24y.fsf_-_@kaka.sjd.se> (Simon Josefsson via's message of "Mon, 23 Dec 2024 19:08:45 +0100")
[-- Attachment #1: Type: text/plain, Size: 2756 bytes --]
I believe the GitLab CI entrypoint behaviour boils down to OCI
configuration, compare Debian's image:
skopeo inspect --config docker://debian:12
...
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"bash"
]
},
The images I generate via 'guix pack':
skopeo inspect --config docker://registry.gitlab.com/debdistutils/guix/container:stage1
...
"config": {
"Env": [
"PATH=/gnu/store/5n0rm83hn6xwf57iwlrn6sfcr5bfjdv3-profile/bin"
]
},
Using `guix pack --entry-point` changes it into:
"config": {
"Env": [
"PATH=/gnu/store/0plsn32m4xzv4i9ixbx02d42nhbw5hx6-profile/bin"
],
"Entrypoint": [
"/gnu/store/0plsn32m4xzv4i9ixbx02d42nhbw5hx6-profile/bash"
]
},
However if we want the same behaviour as the debian:12 container image,
we want to set "Cmd" instead of "Entrypoint".
I found the code for this in guix/docker.scm and guix/scripts/pack.scm
but making changes this deep down is beyond me right now. Help?
IMHO the best would be if Guix container images looked like this:
"config": {
"Env": [
"PATH=/gnu/store/5n0rm83hn6xwf57iwlrn6sfcr5bfjdv3-profile/bin"
],
"Cmd": [
"bash"
]
},
Comparing some other well-known images, fedora:42 has:
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"DISTTAG=f42container",
"FGC=f42",
"FBR=f42"
],
"Cmd": [
"/bin/bash"
],
"WorkingDir": "/",
"Labels": {
"maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
}
},
AlmaLinux:8 and AlmaLinux:9 has:
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/bash"
],
"WorkingDir": "/"
},
Alpine:latest has:
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh"
],
"WorkingDir": "/"
},
ArchLinux:latest has:
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8"
],
"Cmd": [
"/usr/bin/bash"
],
"WorkingDir": "/",
Ubuntu:24.04 has:
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/bash"
],
/Simon
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
next prev parent reply other threads:[~2024-12-25 18:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 12:36 Building a Docker image for GitLab-CI Suhail
2024-12-15 21:05 ` Cayetano Santos
2024-12-15 21:27 ` Cayetano Santos
2024-12-16 10:42 ` Simon Josefsson via
2024-12-16 11:04 ` Andreas Enge
2024-12-18 19:17 ` Simon Josefsson via
2024-12-18 22:31 ` Cayetano Santos via
2024-12-17 7:52 ` Ludovic Courtès
2024-12-17 8:07 ` Simon Josefsson via
2024-12-17 10:24 ` Ludovic Courtès
2024-12-17 23:46 ` Simon Josefsson via
2024-12-21 15:33 ` Ludovic Courtès
2024-12-22 18:07 ` Simon Josefsson via
2024-12-23 18:08 ` Container image entrypoints on Gitlab (was: Re: Building a Docker image for GitLab-CI) Simon Josefsson via
2024-12-25 18:13 ` Simon Josefsson via [this message]
2024-12-23 18:57 ` GitLab container /etc symlink problem " Simon Josefsson via
2024-12-25 20:38 ` Building a Docker image for GitLab-CI Simon Josefsson via
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ikr7ocks.fsf@kaka.sjd.se \
--to=help-guix@gnu.org \
--cc=csantosb@inventati.org \
--cc=ludo@gnu.org \
--cc=simon@josefsson.org \
--cc=suhail@bayesians.ca \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).