From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Guix in Docker for automated CD/CI of complex software Date: Mon, 25 Nov 2019 22:33:17 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59652) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZLzF-0006R8-R4 for guix-devel@gnu.org; Mon, 25 Nov 2019 16:33:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZLzD-0003UE-ID for guix-devel@gnu.org; Mon, 25 Nov 2019 16:33:37 -0500 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]:44833) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZLz9-0003R7-JJ for guix-devel@gnu.org; Mon, 25 Nov 2019 16:33:31 -0500 Received: by mail-qt1-x842.google.com with SMTP id g24so12117498qtq.11 for ; Mon, 25 Nov 2019 13:33:29 -0800 (PST) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Vicente Eduardo Cc: Guix Devel Hi, On Fri, 22 Nov 2019 at 19:57, Vicente Eduardo wrote: > [...] I want to run guix inside docker in order to have a portable installation of guix for common ci/cd enviroments. I was suggesting that maybe you can use Guix to create this image. :-) --8<---------------cut here---------------start------------->8--- $ guix describe Generation 57 Nov 25 2019 14:26:15 (current) guix b5d4d5b repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: b5d4d5b9bcf267fddd02fcc14b88eac0bebf979f --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ guix pack \ -f docker \ -C none \ -S /bin=bin \ -S /lib=lib \ -S /share=share \ -S /etc=etc \ guix $ docker load < /gnu/store/8vrdpas5s9alpczixc8bw83x9sxc8if5-docker-pack.tar --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- $ docker run -ti guix guix --version --8<---------------cut here---------------end--------------->8--- Obviously, it needs some love (dameon) to fit your use case. And I do not know if it make sense but I would try to replace this Dockerfile [1] by a manifest and "guix pack". Or maybe as a first step using Dockerfile based on Guix instead of Alpine. [1] https://github.com/metacall/guix/blob/master/Dockerfile And even, instead of the raw instruction, I would use the installation script [2]. [2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh > Here's the metacall schema: https://github.com/metacall/distributable/blob/53caad582cd097c5e92798bf0ec16660bfc4030c/source/metacall.scm > > My idea is to generate a zip with all libraries self contained, rather than a Docker image. The "guix pack" should fit your need. But I am not sure because it is a simple cmake-build-system with few (guix) dependencies, i.e., it "relies a lot in CMake features like ExternalProject". All the best, simon