From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6DGjKfn/dGQ25gAASxT56A (envelope-from ) for ; Mon, 29 May 2023 21:41:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mFu6Kfn/dGR7iwAAauVa8A (envelope-from ) for ; Mon, 29 May 2023 21:41:45 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 236BC3971C for ; Mon, 29 May 2023 21:41:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3ik2-0004J4-5Z; Mon, 29 May 2023 15:41:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3ik0-0004Hm-Ip for Help-Guix@gnu.org; Mon, 29 May 2023 15:41:16 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3ijy-0001Wx-BQ for Help-Guix@gnu.org; Mon, 29 May 2023 15:41:16 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id C0BA41E811A; Mon, 29 May 2023 19:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1685389268; bh=9xbmU2IskriUIk262Dvi2sq1HVHMuy/PYh+4cfE76cE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=oO6ddBf0dcBllKnlECvppjCb+5RrkauXspKnYxp1hoiP2RcdVXr20AarA80WsoFGL vVXLnvHY72vImMJM4XZ9ox6a7l2nucGisXmNY+r/MBbZ6a+O5daGAjVY2F1phf5bH2 cxuLHkbUf+5hBc6D/lSM5wdYKQ7Mm6mRZ3pdtcWmah2Rn9GYYmeahyKKpOD4sH0PoH ZZhZGk972tZoyWSNawO2c/04QL6Da7d3MoxO9EQopNOQV6Kc4MRzz+xU8ye70GcIh3 3wYxhVgENgL9365KZafHFbcEaSrCtLuq4P/4mlTiXbvM2GZBJTrmpB+G3quDE+VGWP opmKzLJ/fhVC3VVJBN6cyDClvgUjHSpG/OUrYlcCcfxLA2xuRtL3w6J9hCA3XVKx2K YF0ecHoDq8OyfKszK9R3eKMqXZgKlhlF0dePqagludgVMqLP2y+KqqMfd5jn76aGXi y2FEkzif4MUTwr6rHgHwdzh4in7D3/jggeNef5QL0GgKYNK+l6TkGDjNmqEcMkLl66 C1GkVBSTY9utSURFA2H148v/rq+rl/mEPFJAzy/GnWVNMASGhHrCkTd/3s4wxjg9BN EdASDugddnPJ2jafJFM3P7/OKG2HShpYnxFU/+QhsObbaRzJJI5BKh0duqayJQQD/N 550T2p0qsFN8vFRcCQk2vx1E= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id D8C051E81B9; Mon, 29 May 2023 19:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1685389264; bh=9xbmU2IskriUIk262Dvi2sq1HVHMuy/PYh+4cfE76cE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=jDmeaKPC2P3yTxz+/wEtRo5LxdfgMKbMZ3YDzChfnm/hV9oaddVrUjVkGqHetn3Vx nWgvEy/67mrnUrcnF2EqZtoGytmHC4CwKcVKmUrg1kCRn12fQV+rvOv/tuppKpr21V gqlaitPu/Mrr7FNJMlskWmrumq2yAuO3gRj2jJiFgy9kdjNSgZJod8/UAD0xJjbvlA YqUWcB+MiHa23pxBSHWuuTTZOR2AlOJfW3u+PXoshaOx7UB5Cc+a2NMsJubV2W7p5k zcnYHj7rJEofYdY8mPEl1UK7O+OPTC7A2gKEBffXYWq8D3M6B/JKmOmkTUUvixAHar l+2PMH9u+h63NOQChhIu97Xvc0KLZfi69RIHx5KA/4Zd/ukS3FGiOxVBJDfaj3uaO1 3h4pi7oc48OqcYtnYG+JIlskGf9Doe8lDhEy0vENhJVbdnzvNCKoijUHy/6pQR2JZb jlZzRjgONE39ZMIFtN31txuzUr3FWpk/nuklc0zkjfKUzohzVzIAtUvuEBLU0HM3W/ C3y++efnuIJfWxYa4XFWIxxtmJGZ8J8sf51ccffX0wl23jaMOPCFifVo1/riu219Mz 39q4avy6hBjzjRMbyl6UTtY9VhdaV0z5Mz41g2iPhd5D2SHu6RbyBD63lT5aREXRxM DsbHHh84DoBQ5pSSGXSLU66Y= Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id ca20d537; Mon, 29 May 2023 19:41:01 +0000 (UTC) Date: Mon, 29 May 2023 21:41:01 +0200 From: wolf To: Graham Addis Cc: Help-Guix@gnu.org Subject: Re: guix docker on gitlab-ci Message-ID: Mail-Followup-To: Graham Addis , Help-Guix@gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fr3QzJORKhgOKDNh" Content-Disposition: inline In-Reply-To: Received-SPF: none client-ip=37.205.8.62; envelope-from=ws@wolfsnet.cz; helo=wolfsden.cz X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685389305; a=rsa-sha256; cv=none; b=f1NkK4IGtXUUpjOWMfx5u04rOTG8551Iwknjzq6vO0zX+ELm3jzvpJKjyVP87TvmUSmz8z BtzD+nOCE6rQdDYLsfplevs6rqD0VtcmeF0+iiFDvk+AWGS3/3CSBiwGNQj9Nwjb4fENX4 wln3H76ankce2GP2ZZpdGafZ8PeGVoqnlox8dB/5pXcFdYETgFZicVKxr70NBDSP/LVoVT rtK1jc7be9E9wuioeO2PVspfgcw7TuEIpBP3e2EK3izoUEE4fqGIWKRw+2ifxHlr7KOH06 iD5Ri5alUuMxzDKsDiMgvFUavx8R75WJnR0yTsFc27rLhBx9rOlgIpUpmEQBxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=oO6ddBf0; dkim=pass header.d=wolfsden.cz header.s=mail header.b=jDmeaKPC; dmarc=pass (policy=none) header.from=wolfsden.cz; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685389305; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4Jtc2Sxn7u0e5/w8cnBgyIVJzRuELzvUUFToifph4XU=; b=PshYyWdaOEclgA22HsaYGlaGahEWbOVBpoOKxzQheCTKeTTJ8HvwWqWegctVrnMJkiDAV2 nsze0SbPccTbHFAznD2yf9q9wDshxPPdCoX2b/7TsQ/DgFBz0d+aWagP1qBPKdh7938+Wo CPBm5vDriz2OsMQCZxTmR5Oqm5odma5GSrdfNg/0bZteGC2SVMJgz60gm8NgKNp30HrunA NhO60s3o5V956ixsWMKoU314WRGv5Y+HhDeKnqQNPwnCNIIMZaJ3S4BtUyHmy2A9zp4fpI 6ItBk/vcVAUsbP86B7FYGtBjJ+ZQ/VI9NfBJE6hrEhYvKbem+Z6fwgWSEkekWQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=oO6ddBf0; dkim=pass header.d=wolfsden.cz header.s=mail header.b=jDmeaKPC; dmarc=pass (policy=none) header.from=wolfsden.cz; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.74 X-Spam-Score: -5.74 X-Migadu-Queue-Id: 236BC3971C X-TUID: sEVWbsC8GJfA --fr3QzJORKhgOKDNh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-05-24 18:04:47 +0100, Graham Addis wrote: > Dear people, >=20 > I tried to create a docker image to use in a gitlab-ci instance but it > failed because I couldn't use --entry-point=3D"bin/sh -l -c" or > equivalent, basically the gitlab-runner complains that it can't run > binaries. Would this be better using just bin/sh for the entry point and passing the = -l and -c as an arguments? >=20 > I've managed to get it working by making some changes to guix/scripts/pac= k.scm >=20 > 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=3D"bin/sh -l -c" >=20 > (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)))))) If I read this right (sorry, still somewhat new to guile), you basically sp= lit the --entry-point argument on spaces and use those parts as separate values= to invoke, is that correct? If so, how would you pass a binary that has space= in the name (joke example: `/bin/ba sh') into the entry-point? >=20 > And replacing the setting of entry-point in the build-docker-image call t= o: >=20 > #:entry-point (make-docker-exec-form > #$profile #$entry-point) >=20 > The call to build-docker-image takes a list for entry-point, and it > all works fine as far as I can tell. >=20 > Before I send in a patch, some questions: >=20 > Am I missing something? >=20 > Am I on the right track? In my opinion (which you are free to disagree with :) ), I think it would be better to either have /bin/sh as an entry-point (and pass -l -c as arguments when starting the container, if required) or create a wrapper script /bin/s= hlc that would exec /bin/sh with correct arguments. Few random ideas: Maybe the same format Containerfiles use for cmd and entrypoint directives could be used? Maybe the --entry-point could also (in addition to a string) accept a list of strings (LISP list)? >=20 > Should I be splitting this out before the call to docker-image? >=20 > Thanks, >=20 > Graham >=20 --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --fr3QzJORKhgOKDNh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmR0/80ACgkQL7/ufbZ/ walRRxAArKh2UUU6m6uEz7EZnxNDm4vqI2u9Ia/JXK0HuS1Z74gpZ3qtfkTyUW9e 0KdfS0xIy+GLduYdz+GUIzdv9RdRx0DRg1sAF1+X/JLs6dl9KKFTOEKYBNdKb/ud 3VSylSH69+Hd7tZHHwMRSAHfbVC2kdYS5tsC6U8mFfAC6JhJhVoBoyzgLtMhSdsE xUBTWC1nqdZ1T5fDIm4fIro/TBCYg3iRMsVQs1zA0fcDTTRIGgZipdfbbFrM5/GV 0D/DfKM/EfbhjIPodMsjrHVtkRWp9Nf7RDPlHV8z2ZncQu1D1/Ob5aiUG4CAir/w /7++BXuoZPPZKWGmS+ZmcWOPa3/uOY1ZAa7YgLUO1OtnAY11GhI890NHz1jl3cvB QqDNdx8HR0Euk3AJ8xZ3zHkQrDfU1npnGB+odPzFrMv64s+6peMBOto14+BUM280 LXcAQimmahCKpd8mytm2/cENVHizcy4ez9vJSWLeEDBziLGk49YIW3XcmbzpPM4/ idepyfyhG7oMckSlAE1FCoJ3XmmWtLkexQjxdxsoLyy//ub6CzgOc0/XvnxHX98j HP6ErrKYEbe8ybwhvmEGdXLCxfUcjaqv0I1bzKtylbtkmzb7VRJmaR81S68HvFrb CKvxn92MrEM+bttVK99uJ7RpmWHe0Jjbf7oo8rNp0be/9Tmie2s= =zLtS -----END PGP SIGNATURE----- --fr3QzJORKhgOKDNh--