From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qKDfIn2Cg2FVAQEAgWs5BA (envelope-from ) for ; Thu, 04 Nov 2021 07:49:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0O1zHn2Cg2GdbwAAbx9fmQ (envelope-from ) for ; Thu, 04 Nov 2021 06:49:33 +0000 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 1467B364CC for ; Thu, 4 Nov 2021 07:49:32 +0100 (CET) Received: from localhost ([::1]:56438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miWZ0-0003QZ-MU for larch@yhetil.org; Thu, 04 Nov 2021 02:49:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miWYZ-0003OJ-0r for guix-patches@gnu.org; Thu, 04 Nov 2021 02:49:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miWYY-0007vD-Jz for guix-patches@gnu.org; Thu, 04 Nov 2021 02:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miWYY-0004LE-E5 for guix-patches@gnu.org; Thu, 04 Nov 2021 02:49:02 -0400 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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Alexey Abramov X-ACL-Warn: , Alexey Abramov via Guix-patches From: Alexey Abramov via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636008573; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=eo5jt7lcS3jccGXA7tfFAQFUQabsNOyWy7mok4zs1uc=; b=CbEB43rFT/PVksCO0+0IpTB5HZIFD5+yLsEZVY9/SLUsdoTIlmAZG4X6qnthPbM7VyzrmY pjMFxOJAAVS4J0XXMGpG/j86G9tG1mdYo2O/hSEwj3IPQzhz69Ll+vO5ohlKclZxqjoqQj G91i0KhuE+LaeYvuWxiSEa4CNx6YA6fCo4Lu4pMa50EBnz4Zv0rQDyGjni/V99jPuYY1W1 2b7aqLGBwfJBgXFogve13QoD7HbEGgpuLSasjQoP0i4upVxChX6w/18CdPeidu84QEbToC jMBWNxJJYeaWW8Tiyr0kEgUFDXyyvavtlwJGEvT+FL/qMDi+5jDbOuTUirBREg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636008573; a=rsa-sha256; cv=none; b=IOi+3YlUMYFwjWnSeFe5rTz6A6Vdc4i/e71MjoRveX1oP+eKiFZYMVWJNVj1j7W3IHPDvD FbircdnK56puz8QKz5GS+pB85LJV5n11kxIYgH+YffqZI5u7eSsUa/0HqZ3in+VO7MwEVi e8PgX31tEHzWW2DpDXN+xVQ343I0vMskEPB9WsOQG7SSdhmC7IRnk9Vf8nDbFLPtxI5gCv Xqh0tX7ryhCFD7LKiN4mva2/KaxWFBVqOYpMYZMiHdaDb7DPKR4TlGSqYE5BFUO/oREsAD 8kn2YwJr5F7n38PfQamFrRhP0/vl7Lu70n1fjyw4KmwCBKFxk6AhQT+77qQ+hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b="7zYk uza"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b="7zYk uza"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 1467B364CC X-Spam-Score: 2.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: EKMQH1sI9Yjl * 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