From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Docker export: add /etc/environment? Date: Mon, 21 Aug 2017 12:02:39 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djjXw-00021M-Uo for guix-devel@gnu.org; Mon, 21 Aug 2017 06:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djjXr-0001t2-7b for guix-devel@gnu.org; Mon, 21 Aug 2017 06:03:00 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:58257) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1djjXq-0001qn-TO for guix-devel@gnu.org; Mon, 21 Aug 2017 06:02:55 -0400 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 0CBDB380623 for ; Mon, 21 Aug 2017 12:02:46 +0200 (CEST) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Robqp13W3yFI for ; Mon, 21 Aug 2017 12:02:40 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Mon, 21 Aug 2017 12:02:40 +0200 (CEST) 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: guix-devel Hi Guix, I just used Guix to export a Docker image for a genomics pipeline our research group has worked on. In order to run the tool in the container a couple of environment variables have to be set, such as TZDIR, LC_ALL, GUIX_LOCPATH, and PATH. Currently, this must be done by users leading to ugly Docker command lines, such as this: docker run --rm \ -e TZDIR=3D/share/zoneinfo \ -e LC_ALL=3Den_US.UTF-8 \ -e GUIX_LOCPATH=3D/lib/locale \ -e PATH=3D/bin \ -v $PWD:/foo -w /foo \ --tmpfs /tmp \ -ti $image \ /bin/pigx_bs ./test/Tablesheet.txt This depends on exporting a profile with =E2=80=9Cshare=E2=80=9D, =E2=80=9C= lib=E2=80=9D, and =E2=80=9Cbin=E2=80=9D linked to the root level: guix pack -e '(load "guix.scm")' \ -f docker \ -S /bin=3Dbin -S /lib=3Dlib -S /share=3Dshare \ glibc-utf8-locales gzip tzdata coreutils (=E2=80=9Cguix.scm=E2=80=9D evaluates to the pipeline package.) Is there (or should there be) a way to populate /etc/environment such that all these environment variables are set automatically? Especially for =E2=80=9Cguix pack -f docker=E2=80=9D it makes sense to me= to include a default =E2=80=9C/etc/environment=E2=80=9D that includes things we set up= in GuixSD by default, such as GUIX_LOCPATH, and that sources the packed profile=E2=80=99= s =E2=80=9Cetc/profile=E2=80=9D. What do you think? -- Ricardo