From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WEKzKuLCjWUEAQAAkFu2QA (envelope-from ) for ; Thu, 28 Dec 2023 19:48:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8MEEJuLCjWUFxQAAqHPOHw (envelope-from ) for ; Thu, 28 Dec 2023 19:48:02 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=psyleft.com header.s=MBO0001 header.b=I5+O+4Qt; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703789282; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=YpWfJI5+liU9cN6dWlPPhjZYLiGRoRLtbC/rn+UBKiU=; b=WkJmu21jm+JUL4c6s/m/d/Rbt22W4Y4WpyGB6nSQwXTws4UxHffZ7w/65rrNnDvW2VK88t bYXh7ar02sBlloQWFbr1bbZ9lBBoONscPokrC/iBOBqgYBx7X7kZb8c8j6mFzFylFjHnTQ vQZXo9QEvlz5jpCGmgNm5ZqKKWcUfyqbRDEU2ja/dFiptPgGg6AIao/1AlaLhkVjJKEvC4 nAUZeGRRQx3Dusrm+aCdZShwScJhBGp6KjxPv9UyvBGrBMkcn55tfVZu4hKbymQiCtbMBC dPCMSx682po1hGNLJ2jBc+qXp+3Q9mz3uyYO9dZ3rGRoJSeCYq73A1dDaJ8KZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=psyleft.com header.s=MBO0001 header.b=I5+O+4Qt; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703789282; a=rsa-sha256; cv=none; b=oa3FBwrJR6J6BXGkiRxGMrq97DCTCSv6Bpr7iICKHcNx8imeiHcFtd45i8buHpaFFsD8xV m1sn5c73KYcqNsBVDItt3AFMJQTjhDVXjsTA1tvaY8EeIjgg0I1bgZQ52TQZMKuY5DTlpI XtEHZNjKkTx3LK0vA+kb9SCSR8uL2vX1JwDgkVLcCV5GPc7LJBh4BRx6XRK74xE+1Yb620 AJl6hw601G/2ex1rLez9kLB0ffwtzepeLrmfb6xTzZ80oCsQePZHhr5sHXJh1+WboKcjVZ yffwuRYBO02UCSCAa62IKM3fzrXbE/eNZIEFnZpUIinjajiaYuhNtebLXUvajQ== 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 2FEA75E485 for ; Thu, 28 Dec 2023 19:48:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIvQD-0000yZ-62; Thu, 28 Dec 2023 13:47:57 -0500 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 1rIhmb-0008RI-Ja for guix-patches@gnu.org; Wed, 27 Dec 2023 23:14:09 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIhma-0006EG-He; Wed, 27 Dec 2023 23:14:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIhmT-0006pk-TH; Wed, 27 Dec 2023 23:14:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68073] [PATCH] Add config-file configuration option to dockerd Resent-From: Connor Clark Original-Sender: "Debbugs-submit" Resent-CC: paren@disroot.org, guix@cbaines.net, ludo@gnu.org, othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Thu, 28 Dec 2023 04:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68073 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68073@debbugs.gnu.org Cc: Connor Clark , paren@disroot.org, guix@cbaines.net, ludo@gnu.org, othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: paren@disroot.org, guix@cbaines.net, ludo@gnu.org, othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de Received: via spool by submit@debbugs.gnu.org id=B.170373678526169 (code B ref -1); Thu, 28 Dec 2023 04:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Dec 2023 04:13:05 +0000 Received: from localhost ([127.0.0.1]:38215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIhlY-0006nx-8P for submit@debbugs.gnu.org; Wed, 27 Dec 2023 23:13:05 -0500 Received: from lists.gnu.org ([2001:470:142::17]:44648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIaYG-0008LT-P3 for submit@debbugs.gnu.org; Wed, 27 Dec 2023 15:30:53 -0500 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 1rIaYC-0000QF-1A for guix-patches@gnu.org; Wed, 27 Dec 2023 15:30:48 -0500 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rIaY8-0001th-MK for guix-patches@gnu.org; Wed, 27 Dec 2023 15:30:47 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4T0jvJ3jHdz9sSx; Wed, 27 Dec 2023 21:30:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=psyleft.com; s=MBO0001; t=1703709036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=YpWfJI5+liU9cN6dWlPPhjZYLiGRoRLtbC/rn+UBKiU=; b=I5+O+4QtqKWgDusx6v3wh/C7m48uAsbIicqM6j9Y6Co0Ikmq07aWUYftOmgupPt2707yrT dt3KIpC3zpnv6+VPyno2HjPXI2K8L7ve23GazZcQrqJN1C+tdNOFO+IAEb+ZeuWvOfcbbp 1kiWeJOnCecTdW7hb1+wUpyPyPxDlDEnIcIaCsgtcDL9ZKM2s6UgRamwbKl4JI5uUgQIwS HHei7u+j3dz47N2NrhGProCW4M+A/05oPf6b5kVBgMCH7lJAcMomg6xeE/cf58XRqJaLv+ sD2FW+Y5di3DyL+KF7Zm3HuxdVMG+mdforG1ALuqjC2ubZ/OrFgBIXYlJPczFA== Date: Wed, 27 Dec 2023 15:20:21 -0500 Message-ID: <20231227203015.14265-1-connor@psyleft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4T0jvJ3jHdz9sSx Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=connor@psyleft.com; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 27 Dec 2023 23:13:03 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Thu, 28 Dec 2023 13:47:55 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Connor Clark X-ACL-Warn: , Connor Clark via Guix-patches From: Connor Clark via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.96 X-Spam-Score: -4.96 X-Migadu-Queue-Id: 2FEA75E485 X-Migadu-Scanner: mx10.migadu.com X-TUID: xPAScapymoKX --- This is my first time submitting a patch here, so please let me know if I'm missing something important, or my email is formatted incorrectly, or anything else. This patch adds an option to pass a json configuration file directly into dockerd for options which aren't available in the docker-configuration record, of which there are many. From what I've seen, some other packages use a raw-configuration-string that gets appended into a file to accomplish similar things, but I figured a file-like was better here because the rest of the options are passed into the command invocation and not serialized into a file. gnu/services/docker.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 72ef7d74db..4d32b96847 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -61,6 +61,8 @@ (define-module (gnu services docker) oci-container-service-type oci-container-shepherd-service)) +(define-maybe file-like) + (define-configuration docker-configuration (docker (file-like docker) @@ -87,6 +89,9 @@ (define-configuration docker-configuration (environment-variables (list '()) "Environment variables to set for dockerd") + (config-file + (maybe-file-like) + "JSON configuration file to pass to dockerd") (no-serialization)) (define %docker-accounts @@ -131,7 +136,8 @@ (define (docker-shepherd-service 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))) + (debug? (docker-configuration-debug? config)) + (config-file (docker-configuration-config-file config))) (shepherd-service (documentation "Docker daemon.") (provision '(dockerd)) @@ -144,6 +150,10 @@ (define (docker-shepherd-service config) (start #~(make-forkexec-constructor (list (string-append #$docker "/bin/dockerd") "-p" "/var/run/docker.pid" + #$@(if (not (eq? config-file %unset-value)) + (list #~(string-append + "--config-file=" #$config-file)) + '()) #$@(if debug? '("--debug" "--log-level=debug") '()) base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b -- 2.41.0