From unknown Wed Aug 20 05:43:14 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51597] [PATCH] services: docker: Add 'environment-variables' configuration field. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 Nov 2021 06:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51597 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51597@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163600851616652 (code B ref -1); Thu, 04 Nov 2021 06:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2021 06:48:36 +0000 Received: from localhost ([127.0.0.1]:41857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miWY8-0004KW-1r for submit@debbugs.gnu.org; Thu, 04 Nov 2021 02:48:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:57790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miWY6-0004KN-1A for submit@debbugs.gnu.org; Thu, 04 Nov 2021 02:48:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miWY1-0003Bu-6u for guix-patches@gnu.org; Thu, 04 Nov 2021 02:48:29 -0400 Received: from mail.mmer.org ([178.22.65.174]:57794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miWXz-0007Yl-8f for guix-patches@gnu.org; Thu, 04 Nov 2021 02:48:28 -0400 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id f1afac48 for ; Thu, 4 Nov 2021 06:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=dkim; bh=IAxNBaZGlxEJXpH7bwuYE5iyCtcQeEHy/YGvUParaXU=; b=7zYk uza6aeUnLuEamAxSlLzv4xHLqbMQaD6lvK3pu6ONJDdJi3m1aXXF7ISc09Co029H Gthu/qf726teJqt+JdqZ37EVALCDCa4TRcgm/BHVAV3+xeY5ZVT7LTGfqEAiBu11 MZys1nOKaHzUJb7aQ8Rhf9mys1UYBKsT32CnpsA= Received: from delta (j74182.upc-j.chello.nl [24.132.74.182]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id 28a6bdfb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Thu, 4 Nov 2021 06:48:20 +0000 (UTC) From: Alexey Abramov Date: Thu, 4 Nov 2021 07:48:09 +0100 Message-Id: <20211104064809.11582-1-levenson@mmer.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.22.65.174; envelope-from=levenson@mmer.org; helo=mail.mmer.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * gnu/services/docker.scm (docker-configuration): Add the field (docker-shepherd-service): Pass the list of defined variables to make-forkexec-constructor. * doc/guix.texi (Miscellaneous Services): Update doc. --- doc/guix.texi | 3 +++ gnu/services/docker.scm | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 8693249d7c..cf269d6014 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33303,6 +33303,9 @@ Enable or disable debug output. @item @code{enable-iptables?} (default @code{#t}) Enable or disable the addition of iptables rules. +@item @code{environment-variables} (default: @code{()}) +Environment variables to set for dockerd + @end table @end deftp diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index ef551480aa..c4d48676b5 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -62,6 +62,9 @@ loop-back communications.") (enable-iptables? (boolean #t) "Enable addition of iptables rules (enabled by default).") + (environment-variables + (list '()) + "Environment variables to set for dockerd") (no-serialization)) (define %docker-accounts @@ -102,6 +105,7 @@ loop-back communications.") (let* ((docker (docker-configuration-docker config)) (enable-proxy? (docker-configuration-enable-proxy? config)) (enable-iptables? (docker-configuration-enable-iptables? config)) + (environment-variables (docker-configuration-environment-variables config)) (proxy (docker-configuration-proxy config)) (debug? (docker-configuration-debug? config))) (shepherd-service @@ -132,6 +136,8 @@ loop-back communications.") (if #$enable-iptables? "--iptables" "--iptables=false")) + #:environment-variables + (list #$@environment-variables) #:pid-file "/var/run/docker.pid" #:log-file "/var/log/docker.log")) (stop #~(make-kill-destructor))))) -- 2.31.1 From unknown Wed Aug 20 05:43:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alexey Abramov Subject: bug#51597: closed (Re: bug#51597: [PATCH] services: docker: Add 'environment-variables' configuration field.) Message-ID: References: <874k8ax10j.fsf@gnu.org> <20211104064809.11582-1-levenson@mmer.org> X-Gnu-PR-Message: they-closed 51597 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 51597@debbugs.gnu.org Date: Wed, 17 Nov 2021 15:21:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1637162462-27207-1" This is a multi-part message in MIME format... ------------=_1637162462-27207-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #51597: [PATCH] services: docker: Add 'environment-variables' configuration= field. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 51597@debbugs.gnu.org. --=20 51597: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51597 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1637162462-27207-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 51597-done) by debbugs.gnu.org; 17 Nov 2021 15:20:10 +0000 Received: from localhost ([127.0.0.1]:33454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnMjJ-000732-E3 for submit@debbugs.gnu.org; Wed, 17 Nov 2021 10:20:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnMjF-00072I-6W for 51597-done@debbugs.gnu.org; Wed, 17 Nov 2021 10:20:08 -0500 Received: from [2001:470:142:3::e] (port=35522 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnMj8-0005DW-R2; Wed, 17 Nov 2021 10:19:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=mrwg0C741rEMYKb/UVY0/GrMVZLmuV/8cJ68xkwm+No=; b=e4jOAF1G4+AYZbzCmD8w RKp7tPOxMQ0P3Q5dJo2r/188je2BXl6HsYGv3/BUWgADqZPdiGLm83kJRPyI0j14O1G4ZYvY8xUSy Jx5JJDcREDtDgs5kZe5xToX9/sF7R/fm1aFXclAqlc+wl+5F8op2hnNtZfKUxhChRBNtJ+/0JbA9S vl87DNLhF7kj05G/eRF+u+CweVizjxeV4FedGEHCKRLa/xFhkz+UPMaBoWK2mRz7+MLkTKle9ZBoC uSD7jLni3+iKCBiLtwjimL96fCRqiuRUdml+iM2f/Dc6vaeYgMqyfHETmutRX5rNdzIrV2WdaFpyc pQxF95Jr+39z4Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49574 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnMj8-0008HF-IN; Wed, 17 Nov 2021 10:19:58 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Alexey Abramov Subject: Re: bug#51597: [PATCH] services: docker: Add 'environment-variables' configuration field. References: <20211104064809.11582-1-levenson@mmer.org> Date: Wed, 17 Nov 2021 16:19:56 +0100 In-Reply-To: <20211104064809.11582-1-levenson@mmer.org> (Alexey Abramov's message of "Thu, 4 Nov 2021 07:48:09 +0100") Message-ID: <874k8ax10j.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51597-done Cc: 51597-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Alexey Abramov skribis: > * gnu/services/docker.scm (docker-configuration): Add the field > (docker-shepherd-service): Pass the list of defined variables to > make-forkexec-constructor. > * doc/guix.texi (Miscellaneous Services): Update doc. Applied with the clarifications below. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index a9e1f66492..158261e373 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33230,7 +33230,15 @@ Enable or disable debug output. Enable or disable the addition of iptables rules. @item @code{environment-variables} (default: @code{()}) -Environment variables to set for dockerd +List of environment variables to set for @command{dockerd}. + +This must be a list of strings where each string has the form +@samp{@var{key}=@var{value}} as in this example: + +@lisp +(list "LANGUAGE=eo:ca:eu" + "TMPDIR=/tmp/dockerd") +@end lisp @end table @end deftp --=-=-=-- ------------=_1637162462-27207-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Nov 2021 06:48:36 +0000 Received: from localhost ([127.0.0.1]:41857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miWY8-0004KW-1r for submit@debbugs.gnu.org; Thu, 04 Nov 2021 02:48:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:57790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miWY6-0004KN-1A for submit@debbugs.gnu.org; Thu, 04 Nov 2021 02:48:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miWY1-0003Bu-6u for guix-patches@gnu.org; Thu, 04 Nov 2021 02:48:29 -0400 Received: from mail.mmer.org ([178.22.65.174]:57794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miWXz-0007Yl-8f for guix-patches@gnu.org; Thu, 04 Nov 2021 02:48:28 -0400 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id f1afac48 for ; Thu, 4 Nov 2021 06:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=dkim; bh=IAxNBaZGlxEJXpH7bwuYE5iyCtcQeEHy/YGvUParaXU=; b=7zYk uza6aeUnLuEamAxSlLzv4xHLqbMQaD6lvK3pu6ONJDdJi3m1aXXF7ISc09Co029H Gthu/qf726teJqt+JdqZ37EVALCDCa4TRcgm/BHVAV3+xeY5ZVT7LTGfqEAiBu11 MZys1nOKaHzUJb7aQ8Rhf9mys1UYBKsT32CnpsA= Received: from delta (j74182.upc-j.chello.nl [24.132.74.182]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id 28a6bdfb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Thu, 4 Nov 2021 06:48:20 +0000 (UTC) From: Alexey Abramov To: guix-patches@gnu.org Subject: [PATCH] services: docker: Add 'environment-variables' configuration field. Date: Thu, 4 Nov 2021 07:48:09 +0100 Message-Id: <20211104064809.11582-1-levenson@mmer.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.22.65.174; envelope-from=levenson@mmer.org; helo=mail.mmer.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) * gnu/services/docker.scm (docker-configuration): Add the field (docker-shepherd-service): Pass the list of defined variables to make-forkexec-constructor. * doc/guix.texi (Miscellaneous Services): Update doc. --- doc/guix.texi | 3 +++ gnu/services/docker.scm | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 8693249d7c..cf269d6014 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33303,6 +33303,9 @@ Enable or disable debug output. @item @code{enable-iptables?} (default @code{#t}) Enable or disable the addition of iptables rules. +@item @code{environment-variables} (default: @code{()}) +Environment variables to set for dockerd + @end table @end deftp diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index ef551480aa..c4d48676b5 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -62,6 +62,9 @@ loop-back communications.") (enable-iptables? (boolean #t) "Enable addition of iptables rules (enabled by default).") + (environment-variables + (list '()) + "Environment variables to set for dockerd") (no-serialization)) (define %docker-accounts @@ -102,6 +105,7 @@ loop-back communications.") (let* ((docker (docker-configuration-docker config)) (enable-proxy? (docker-configuration-enable-proxy? config)) (enable-iptables? (docker-configuration-enable-iptables? config)) + (environment-variables (docker-configuration-environment-variables config)) (proxy (docker-configuration-proxy config)) (debug? (docker-configuration-debug? config))) (shepherd-service @@ -132,6 +136,8 @@ loop-back communications.") (if #$enable-iptables? "--iptables" "--iptables=false")) + #:environment-variables + (list #$@environment-variables) #:pid-file "/var/run/docker.pid" #:log-file "/var/log/docker.log")) (stop #~(make-kill-destructor))))) -- 2.31.1 ------------=_1637162462-27207-1--