From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH 0/2] Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Dec 2018 10:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15459921704864 (code B ref -1); Fri, 28 Dec 2018 10:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Dec 2018 10:16:10 +0000 Received: from localhost ([127.0.0.1]:39733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpBa-0001GO-7c for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:16:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpBY-0001G9-DK for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:16:08 -0500 Received: from lists.gnu.org ([208.118.235.17]:43907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcpBS-0007DC-Us for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:16:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcpBQ-0000CK-6S for guix-patches@gnu.org; Fri, 28 Dec 2018 05:16:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcpBL-00077R-A6 for guix-patches@gnu.org; Fri, 28 Dec 2018 05:16:00 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42384) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcpBL-00075y-1W for guix-patches@gnu.org; Fri, 28 Dec 2018 05:15:55 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 98B00336031B; Fri, 28 Dec 2018 11:15:52 +0100 (CET) From: Danny Milosavljevic Date: Fri, 28 Dec 2018 11:13:11 +0100 Message-Id: <20181228101311.30793-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 85.13.145.193 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -5.0 (-----) 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: -6.0 (------) Danny Milosavljevic (2): gnu: Add docker-engine. gnu: Add docker-cli. gnu/packages/docker.scm | 144 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH 1/2] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Dec 2018 10:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.15459922805050 (code B ref 33893); Fri, 28 Dec 2018 10:18:02 +0000 Received: (at 33893) by debbugs.gnu.org; 28 Dec 2018 10:18:00 +0000 Received: from localhost ([127.0.0.1]:39737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpDL-0001JI-MV for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:18:00 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:55994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpDI-0001J8-SK for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 05:17:58 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 6D485336031B; Fri, 28 Dec 2018 11:17:55 +0100 (CET) From: Danny Milosavljevic Date: Fri, 28 Dec 2018 11:17:50 +0100 Message-Id: <20181228101751.676-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181228101311.30793-1-dannym@scratchpost.org> References: <20181228101311.30793-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (%docker-version): New variable. (docker-engine): New variable. Export it. --- gnu/packages/docker.scm | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index c58f3f3ca..3d1a90fc7 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,12 +23,18 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages golang) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-web)) +(define %docker-version "18.09.0") + (define-public python-docker-py (package (name "python-docker-py") @@ -142,3 +148,80 @@ created and all the services are started as specified in the configuration.") store API. It allows programmers to interact with a Docker registry using Python without keeping their credentials in a Docker configuration file.") (license license:asl2.0))) + +(define-public docker-engine + (package + (name "docker-engine") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/engine.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1liqbx58grqih6m8hz9y20y5waflv19pv15l3wl64skap2bsn21c")))) + (build-system gnu-build-system) + (arguments + `(#:modules + ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build utils)) + #:imported-modules + (,@%gnu-build-system-modules + (guix build go-build-system)) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version)) + (setenv "AUTO_GOPATH" "1") + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + ;; Our LD doesn't like the statically linked relocatable things + ;; that go produces, so install the dynamic version of + ;; dockerd instead. + ;(substitute* "hack/make/install-binary" + ; (("/binary-daemon") "/dynbinary-daemon")) + #t)) + (add-before 'build 'setup-environment + (assoc-ref go:%standard-phases 'setup-environment)) + (replace 'build + (lambda _ + ;(invoke "hack/make.sh" "binary") + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' + (invoke "hack/make.sh" "dynbinary"))) + (replace 'check + (lambda _ + ; FIXME: Those don't find any of the go packages + ; needed. Probably GOPATH/GOROOT related. + ;(invoke "hack/test/unit") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (install-file "bundles/dynbinary-daemon/dockerd" out-bin) + (install-file "bundles/dynbinary-daemon/dockerd-dev" out-bin)) + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs "out")) + ; TODO: KEEPBUNDLE=1 + ;./source/bundles/dynbinary-daemon/dockerd + ;(invoke "hack/make.sh" "install-binary") + #t))))) + (inputs + `(("btrfs-progs" ,btrfs-progs))) + (native-inputs + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) + ("go" ,go) + ("lvm2" ,lvm2) + ("pkg-config" ,pkg-config))) + (synopsis "Docker container component library") + (description "This package provides a framework to assemble specialized +container systems. It includes components for orchestration, image +management, secret management, configuration management, networking, +provisioning etc.") + (home-page "https://mobyproject.org/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH 2/2] gnu: Add docker-cli. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Dec 2018 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.15459922825072 (code B ref 33893); Fri, 28 Dec 2018 10:19:02 +0000 Received: (at 33893) by debbugs.gnu.org; 28 Dec 2018 10:18:02 +0000 Received: from localhost ([127.0.0.1]:39739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpDO-0001Jc-6w for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:18:02 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:56002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpDK-0001JB-Qa for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 05:17:59 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id B7B1B33622E7; Fri, 28 Dec 2018 11:17:57 +0100 (CET) From: Danny Milosavljevic Date: Fri, 28 Dec 2018 11:17:51 +0100 Message-Id: <20181228101751.676-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181228101751.676-1-dannym@scratchpost.org> References: <20181228101311.30793-1-dannym@scratchpost.org> <20181228101751.676-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-cli): New variable. Export it. --- gnu/packages/docker.scm | 61 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 3d1a90fc7..caf70cbc9 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -24,8 +24,10 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) + #:use-module (gnu packages autotools) #:use-module (gnu packages check) #:use-module (gnu packages golang) #:use-module (gnu packages linux) @@ -225,3 +227,62 @@ management, secret management, configuration management, networking, provisioning etc.") (home-page "https://mobyproject.org/") (license license:asl2.0))) + +(define-public docker-cli + (package + (name "docker-cli") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/cli.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ivisys20kphvbqlazc3bsg7pk0ykj9gjx5d4yg439x4n13jxwvb")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/docker/cli" + ;; TODO: Tests require a running Docker daemon. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'setup-environment-2 + (lambda _ + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + (symlink "src/github.com/docker/cli/scripts" "./scripts") + (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile") + #t)) + (replace 'build + (lambda _ + (invoke "./scripts/build/dynbinary"))) + (replace 'check + (lambda* (#:key make-flags tests? #:allow-other-keys) + (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH"))) + (if tests? + ;; Use the newly-built docker client for the tests. + (with-directory-excursion "src/github.com/docker/cli" + ;; TODO: Run test-e2e as well? + (apply invoke "make" "-f" "docker.Makefile" "test-unit" + (or make-flags '()))) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (chdir "build") + (install-file (readlink "docker") out-bin) + (install-file "docker" out-bin) + #t)))))) + (native-inputs + `(("go" ,go) + ("libltdl" ,libltdl) + ("pkg-config" ,pkg-config))) + (synopsis "Command line interface to Docker") + (description "This package provides a command line interface to Docker.") + (home-page "http://www.docker.com/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v2 0/3] Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604717317992 (code B ref 33893); Sat, 29 Dec 2018 01:33:01 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:32:53 +0000 Received: from localhost ([127.0.0.1]:40738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Uj-0004g8-0c for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:53 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:41992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Uh-0004fs-2A for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:51 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 77D4833604BE; Sat, 29 Dec 2018 02:32:49 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:32:42 +0100 Message-Id: <20181229013245.12853-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181228101311.30793-1-dannym@scratchpost.org> References: <20181228101311.30793-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) Danny Milosavljevic (3): gnu: Add containerd. gnu: Add docker-engine. services: Add docker. gnu/local.mk | 1 + gnu/packages/docker.scm | 201 +++++++++++++++++++++++++++++++++++++++- gnu/services/docker.scm | 90 ++++++++++++++++++ 3 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 gnu/services/docker.scm From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v2 1/3] gnu: Add containerd. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604717718018 (code B ref 33893); Sat, 29 Dec 2018 01:33:02 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:32:57 +0000 Received: from localhost ([127.0.0.1]:40742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Un-0004gX-DC for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:57 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:41994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Ui-0004fz-04 for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:52 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 05AC73361560; Sat, 29 Dec 2018 02:32:50 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:32:43 +0100 Message-Id: <20181229013245.12853-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013245.12853-1-dannym@scratchpost.org> References: <20181228101311.30793-1-dannym@scratchpost.org> <20181229013245.12853-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (containerd): New variable. --- gnu/packages/docker.scm | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index c58f3f3ca..f4e676a9f 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,9 +23,13 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages golang) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-web)) @@ -142,3 +146,48 @@ created and all the services are started as specified in the configuration.") store API. It allows programmers to interact with a Docker registry using Python without keeping their credentials in a Docker configuration file.") (license license:asl2.0))) + +(define-public containerd + (package + (name "containerd") + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/containerd/containerd.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16zn6p1ky3yrgn53z8h9wza53ch91fj47wj5xgz6w4c57j30f66p")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/containerd/containerd" + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'chdir + (lambda _ + (chdir "src/github.com/containerd/containerd") + #t)) + (replace 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" make-flags))) + (replace 'install + (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (apply invoke "make" (string-append "DESTDIR=" out) "install" + make-flags))))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("libseccomp" ,libseccomp))) + (native-inputs + `(("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Container runtime") + (description "This package provides the container daemon for Docker. +It includes image transfer and storage, container execution and supervision, +network attachments.") + (home-page "http://containerd.io/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v2 2/3] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604717818024 (code B ref 33893); Sat, 29 Dec 2018 01:33:02 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:32:58 +0000 Received: from localhost ([127.0.0.1]:40744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Un-0004gZ-MB for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:58 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Uj-0004g7-6R for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:53 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 3B08433604BE; Sat, 29 Dec 2018 02:32:52 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:32:44 +0100 Message-Id: <20181229013245.12853-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013245.12853-1-dannym@scratchpost.org> References: <20181228101311.30793-1-dannym@scratchpost.org> <20181229013245.12853-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-engine): New variable. (%docker-version): New variable. --- gnu/packages/docker.scm | 152 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 151 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index f4e676a9f..3ca2fadfd 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,15 +23,20 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages golang) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-web)) + #:use-module (gnu packages python-web) + #:use-module (gnu packages virtualization)) + +(define %docker-version "18.09.0") (define-public python-docker-py (package @@ -191,3 +196,148 @@ It includes image transfer and storage, container execution and supervision, network attachments.") (home-page "http://containerd.io/") (license license:asl2.0))) + +(define-public docker-engine + (package + (name "docker-engine") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/engine.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1liqbx58grqih6m8hz9y20y5waflv19pv15l3wl64skap2bsn21c")))) + (build-system gnu-build-system) + (arguments + `(#:modules + ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build utils)) + #:imported-modules + (,@%gnu-build-system-modules + (guix build go-build-system)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + ;(substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + ; (("") "")) + (substitute* "builder/builder-next/executor_unix.go" + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (assoc-ref inputs "runc") + "/sbin/runc\"},\n"))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand = .*") + (string-append "DefaultCommand = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "daemon/daemon_unix.go" + (("DefaultShimBinary = .*") + (string-append "DefaultShimBinary = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n")) + (("DefaultRuntimeBinary = .*") + (string-append "DefaultRuntimeBinary = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + (("var defaultCommandCandidates = .*") + (string-append "var defaultCommandCandidates = []string{\"" + (assoc-ref inputs "runc") "/sbin/runc\"}"))) + (substitute* (filter (lambda (name) + (not (string-contains name "test"))) + (find-files "\\.go$")) + (("\"ps\"") + (string-append "\"" (assoc-ref inputs "procps") "/bin/ps\"")) + ; TODO: zfs ? +;getPlatformContainerdDaemonOpts ./cmd/dockerd/daemon_unix.go +; TODO --init-path for docker-init +; ./cmd/dockerd/config_unix.go InitPath +;./daemon/config/config.go DefaultInitBinary + (("exec\\.LookPath\\(\"mkfs\\.xfs\"\\)") + (string-append "\"" (assoc-ref inputs "xfsprogs") + "/bin/mkfs.xfs\"")) + (("exec\\.LookPath\\(\"lvmdiskscan\"\\)") + (string-append "\"" (assoc-ref inputs "lvm2") + "/sbin/lvmdiskscan\"")) + (("exec\\.LookPath\\(\"pvdisplay\"\\)") + (string-append "\"" (assoc-ref inputs "lvm2") + "/sbin/pvdisplay\"")) + (("exec\\.LookPath\\(\"blkid\"\\)") + (string-append "\"" (assoc-ref inputs "util-linux") + "/sbin/blkid\"")) + (("exec\\.LookPath\\(\"unpigz\"\\)") + (string-append "\"" (assoc-ref inputs "pigz") + "/bin/unpigz\"")) + (("exec\\.LookPath\\(\"iptables\"\\)") + (string-append "\"" (assoc-ref inputs "iptables") + "/sbin/iptables\"")) + (("exec\\.LookPath\\(\"ip\"\\)") + (string-append "\"" (assoc-ref inputs "iproute2") + "/sbin/ip\"")) + ;(("LookPath") "Guix_doesnt_want_LookPath") + ) + #t)) + (replace 'configure + (lambda _ + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version)) + (setenv "AUTO_GOPATH" "1") + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + ;; Our LD doesn't like the statically linked relocatable things + ;; that go produces, so install the dynamic version of + ;; dockerd instead. + ;(substitute* "hack/make/install-binary" + ; (("/binary-daemon") "/dynbinary-daemon")) + #t)) + (add-before 'build 'setup-environment + (assoc-ref go:%standard-phases 'setup-environment)) + (replace 'build + (lambda _ + ;(invoke "hack/make.sh" "binary") + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' + (invoke "hack/make.sh" "dynbinary"))) + (replace 'check + (lambda _ + ; FIXME: Those don't find any of the go packages + ; needed. Probably GOPATH/GOROOT related. + ;(invoke "hack/test/unit") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (install-file "bundles/dynbinary-daemon/dockerd" out-bin) + (install-file "bundles/dynbinary-daemon/dockerd-dev" out-bin)) + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs "out")) + ; TODO: KEEPBUNDLE=1 + ;./source/bundles/dynbinary-daemon/dockerd + ;(invoke "hack/make.sh" "install-binary") + #t))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("containerd" ,containerd) ; for containerd-shim + ("runc" ,runc) + ("iproute2" ,iproute) + ("iptables" ,iptables) + ("pigz" ,pigz) + ("procps" ,procps) + ("util-linux" ,util-linux) + ("lvm2" ,lvm2))) + (native-inputs + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) + ("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Docker container component library") + (description "This package provides a framework to assemble specialized +container systems. It includes components for orchestration, image +management, secret management, configuration management, networking, +provisioning etc.") + (home-page "https://mobyproject.org/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v2 3/3] services: Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604718318074 (code B ref 33893); Sat, 29 Dec 2018 01:34:02 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:33:03 +0000 Received: from localhost ([127.0.0.1]:40746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Ut-0004hI-5K for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:33:03 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3Uk-0004gM-P0 for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:32:55 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id CB5FF3361560; Sat, 29 Dec 2018 02:32:53 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:32:45 +0100 Message-Id: <20181229013245.12853-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013245.12853-1-dannym@scratchpost.org> References: <20181228101311.30793-1-dannym@scratchpost.org> <20181229013245.12853-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/services/docker.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/services/docker.scm | 90 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 gnu/services/docker.scm diff --git a/gnu/local.mk b/gnu/local.mk index 925d955a6..f6c91dcc7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -482,6 +482,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/desktop.scm \ %D%/services/dict.scm \ %D%/services/dns.scm \ + %D%/services/docker.scm \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/kerberos.scm \ diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm new file mode 100644 index 000000000..e592185f8 --- /dev/null +++ b/gnu/services/docker.scm @@ -0,0 +1,90 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services docker) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:use-module (gnu packages docker) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + + #:export (docker-configuration + docker-service-type)) + +(define-configuration docker-configuration + (docker + (package docker-engine) + "Docker daemon package.") + (containerd + (package containerd) + "containerd package.")) + +(define %docker-accounts + (list (user-group (name "docker") (system? #t)))) + +(define (%containerd-activation config) + (let ((state-dir "/var/lib/containerd")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (%docker-activation config) + (%containerd-activation config) + (let ((state-dir "/var/lib/docker")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +;; TODO: Refactor out into its own module? How to depend on it then? +(define (containerd-shepherd-service config) + (let* ((package (docker-configuration-containerd config))) + (shepherd-service + (documentation "containerd daemon.") + (provision '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/containerd")))) + (stop #~(make-kill-destructor))))) + +(define (docker-shepherd-service config) + (let* ((docker (docker-configuration-docker config))) + (shepherd-service + (documentation "Docker daemon.") + (provision '(dockerd)) + (requirement '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$docker "/bin/dockerd")))) + (stop #~(make-kill-destructor))))) + +(define docker-service-type + (service-type (name 'docker) + (extensions + (list + (service-extension activation-service-type + %docker-activation) + (service-extension shepherd-root-service-type + (lambda args + (list (apply containerd-shepherd-service args) + (apply docker-shepherd-service args)))) + (service-extension account-service-type + (const %docker-accounts)))) + (default-value (docker-configuration)))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v3 0/4] Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604755218651 (code B ref 33893); Sat, 29 Dec 2018 01:40:02 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:39:12 +0000 Received: from localhost ([127.0.0.1]:40755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3aq-0004qk-G7 for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:12 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3ao-0004qV-Fx for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:10 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 5A8A23361560; Sat, 29 Dec 2018 02:39:09 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:39:02 +0100 Message-Id: <20181229013906.17705-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013245.12853-1-dannym@scratchpost.org> References: <20181229013245.12853-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) Includes docker-cli now. Danny Milosavljevic (4): gnu: Add containerd. gnu: Add docker-engine. services: Add docker. gnu: Add docker-cli. gnu/local.mk | 1 + gnu/packages/docker.scm | 264 +++++++++++++++++++++++++++++++++++++++- gnu/services/docker.scm | 90 ++++++++++++++ 3 files changed, 354 insertions(+), 1 deletion(-) create mode 100644 gnu/services/docker.scm From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v3 1/4] gnu: Add containerd. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604755718676 (code B ref 33893); Sat, 29 Dec 2018 01:40:02 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:39:17 +0000 Received: from localhost ([127.0.0.1]:40758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3at-0004r6-RS for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:17 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3ap-0004qc-Cz for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:11 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 693D33361735; Sat, 29 Dec 2018 02:39:10 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:39:03 +0100 Message-Id: <20181229013906.17705-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013906.17705-1-dannym@scratchpost.org> References: <20181229013245.12853-1-dannym@scratchpost.org> <20181229013906.17705-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (containerd): New variable. --- gnu/packages/docker.scm | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index c58f3f3ca..f4e676a9f 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,9 +23,13 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages golang) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-web)) @@ -142,3 +146,48 @@ created and all the services are started as specified in the configuration.") store API. It allows programmers to interact with a Docker registry using Python without keeping their credentials in a Docker configuration file.") (license license:asl2.0))) + +(define-public containerd + (package + (name "containerd") + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/containerd/containerd.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16zn6p1ky3yrgn53z8h9wza53ch91fj47wj5xgz6w4c57j30f66p")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/containerd/containerd" + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'chdir + (lambda _ + (chdir "src/github.com/containerd/containerd") + #t)) + (replace 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" make-flags))) + (replace 'install + (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (apply invoke "make" (string-append "DESTDIR=" out) "install" + make-flags))))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("libseccomp" ,libseccomp))) + (native-inputs + `(("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Container runtime") + (description "This package provides the container daemon for Docker. +It includes image transfer and storage, container execution and supervision, +network attachments.") + (home-page "http://containerd.io/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v3 2/4] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604755818689 (code B ref 33893); Sat, 29 Dec 2018 01:40:03 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:39:18 +0000 Received: from localhost ([127.0.0.1]:40761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3av-0004rB-JO for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:18 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3aq-0004qj-BR for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:12 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 65C403361560; Sat, 29 Dec 2018 02:39:11 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:39:04 +0100 Message-Id: <20181229013906.17705-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013906.17705-1-dannym@scratchpost.org> References: <20181229013245.12853-1-dannym@scratchpost.org> <20181229013906.17705-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-engine): New variable. (%docker-version): New variable. --- gnu/packages/docker.scm | 152 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 151 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index f4e676a9f..3ca2fadfd 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,15 +23,20 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages golang) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-web)) + #:use-module (gnu packages python-web) + #:use-module (gnu packages virtualization)) + +(define %docker-version "18.09.0") (define-public python-docker-py (package @@ -191,3 +196,148 @@ It includes image transfer and storage, container execution and supervision, network attachments.") (home-page "http://containerd.io/") (license license:asl2.0))) + +(define-public docker-engine + (package + (name "docker-engine") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/engine.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1liqbx58grqih6m8hz9y20y5waflv19pv15l3wl64skap2bsn21c")))) + (build-system gnu-build-system) + (arguments + `(#:modules + ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build utils)) + #:imported-modules + (,@%gnu-build-system-modules + (guix build go-build-system)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + ;(substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + ; (("") "")) + (substitute* "builder/builder-next/executor_unix.go" + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (assoc-ref inputs "runc") + "/sbin/runc\"},\n"))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand = .*") + (string-append "DefaultCommand = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "daemon/daemon_unix.go" + (("DefaultShimBinary = .*") + (string-append "DefaultShimBinary = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n")) + (("DefaultRuntimeBinary = .*") + (string-append "DefaultRuntimeBinary = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + (("var defaultCommandCandidates = .*") + (string-append "var defaultCommandCandidates = []string{\"" + (assoc-ref inputs "runc") "/sbin/runc\"}"))) + (substitute* (filter (lambda (name) + (not (string-contains name "test"))) + (find-files "\\.go$")) + (("\"ps\"") + (string-append "\"" (assoc-ref inputs "procps") "/bin/ps\"")) + ; TODO: zfs ? +;getPlatformContainerdDaemonOpts ./cmd/dockerd/daemon_unix.go +; TODO --init-path for docker-init +; ./cmd/dockerd/config_unix.go InitPath +;./daemon/config/config.go DefaultInitBinary + (("exec\\.LookPath\\(\"mkfs\\.xfs\"\\)") + (string-append "\"" (assoc-ref inputs "xfsprogs") + "/bin/mkfs.xfs\"")) + (("exec\\.LookPath\\(\"lvmdiskscan\"\\)") + (string-append "\"" (assoc-ref inputs "lvm2") + "/sbin/lvmdiskscan\"")) + (("exec\\.LookPath\\(\"pvdisplay\"\\)") + (string-append "\"" (assoc-ref inputs "lvm2") + "/sbin/pvdisplay\"")) + (("exec\\.LookPath\\(\"blkid\"\\)") + (string-append "\"" (assoc-ref inputs "util-linux") + "/sbin/blkid\"")) + (("exec\\.LookPath\\(\"unpigz\"\\)") + (string-append "\"" (assoc-ref inputs "pigz") + "/bin/unpigz\"")) + (("exec\\.LookPath\\(\"iptables\"\\)") + (string-append "\"" (assoc-ref inputs "iptables") + "/sbin/iptables\"")) + (("exec\\.LookPath\\(\"ip\"\\)") + (string-append "\"" (assoc-ref inputs "iproute2") + "/sbin/ip\"")) + ;(("LookPath") "Guix_doesnt_want_LookPath") + ) + #t)) + (replace 'configure + (lambda _ + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version)) + (setenv "AUTO_GOPATH" "1") + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + ;; Our LD doesn't like the statically linked relocatable things + ;; that go produces, so install the dynamic version of + ;; dockerd instead. + ;(substitute* "hack/make/install-binary" + ; (("/binary-daemon") "/dynbinary-daemon")) + #t)) + (add-before 'build 'setup-environment + (assoc-ref go:%standard-phases 'setup-environment)) + (replace 'build + (lambda _ + ;(invoke "hack/make.sh" "binary") + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' + (invoke "hack/make.sh" "dynbinary"))) + (replace 'check + (lambda _ + ; FIXME: Those don't find any of the go packages + ; needed. Probably GOPATH/GOROOT related. + ;(invoke "hack/test/unit") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (install-file "bundles/dynbinary-daemon/dockerd" out-bin) + (install-file "bundles/dynbinary-daemon/dockerd-dev" out-bin)) + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs "out")) + ; TODO: KEEPBUNDLE=1 + ;./source/bundles/dynbinary-daemon/dockerd + ;(invoke "hack/make.sh" "install-binary") + #t))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("containerd" ,containerd) ; for containerd-shim + ("runc" ,runc) + ("iproute2" ,iproute) + ("iptables" ,iptables) + ("pigz" ,pigz) + ("procps" ,procps) + ("util-linux" ,util-linux) + ("lvm2" ,lvm2))) + (native-inputs + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) + ("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Docker container component library") + (description "This package provides a framework to assemble specialized +container systems. It includes components for orchestration, image +management, secret management, configuration management, networking, +provisioning etc.") + (home-page "https://mobyproject.org/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v3 3/4] services: Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604755918695 (code B ref 33893); Sat, 29 Dec 2018 01:40:03 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:39:19 +0000 Received: from localhost ([127.0.0.1]:40763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3aw-0004rO-M2 for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:19 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3ar-0004qs-C1 for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:13 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 53F8833604BE; Sat, 29 Dec 2018 02:39:12 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:39:05 +0100 Message-Id: <20181229013906.17705-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013906.17705-1-dannym@scratchpost.org> References: <20181229013245.12853-1-dannym@scratchpost.org> <20181229013906.17705-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/services/docker.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/services/docker.scm | 90 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 gnu/services/docker.scm diff --git a/gnu/local.mk b/gnu/local.mk index 925d955a6..f6c91dcc7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -482,6 +482,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/desktop.scm \ %D%/services/dict.scm \ %D%/services/dns.scm \ + %D%/services/docker.scm \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/kerberos.scm \ diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm new file mode 100644 index 000000000..e592185f8 --- /dev/null +++ b/gnu/services/docker.scm @@ -0,0 +1,90 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services docker) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:use-module (gnu packages docker) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + + #:export (docker-configuration + docker-service-type)) + +(define-configuration docker-configuration + (docker + (package docker-engine) + "Docker daemon package.") + (containerd + (package containerd) + "containerd package.")) + +(define %docker-accounts + (list (user-group (name "docker") (system? #t)))) + +(define (%containerd-activation config) + (let ((state-dir "/var/lib/containerd")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (%docker-activation config) + (%containerd-activation config) + (let ((state-dir "/var/lib/docker")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +;; TODO: Refactor out into its own module? How to depend on it then? +(define (containerd-shepherd-service config) + (let* ((package (docker-configuration-containerd config))) + (shepherd-service + (documentation "containerd daemon.") + (provision '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/containerd")))) + (stop #~(make-kill-destructor))))) + +(define (docker-shepherd-service config) + (let* ((docker (docker-configuration-docker config))) + (shepherd-service + (documentation "Docker daemon.") + (provision '(dockerd)) + (requirement '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$docker "/bin/dockerd")))) + (stop #~(make-kill-destructor))))) + +(define docker-service-type + (service-type (name 'docker) + (extensions + (list + (service-extension activation-service-type + %docker-activation) + (service-extension shepherd-root-service-type + (lambda args + (list (apply containerd-shepherd-service args) + (apply docker-shepherd-service args)))) + (service-extension account-service-type + (const %docker-accounts)))) + (default-value (docker-configuration)))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v3 4/4] gnu: Add docker-cli. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Dec 2018 01:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154604756318706 (code B ref 33893); Sat, 29 Dec 2018 01:40:04 +0000 Received: (at 33893) by debbugs.gnu.org; 29 Dec 2018 01:39:23 +0000 Received: from localhost ([127.0.0.1]:40765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3b1-0004re-2R for submit@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:23 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gd3at-0004r5-Lb for 33893@debbugs.gnu.org; Fri, 28 Dec 2018 20:39:17 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 9F81033604BE; Sat, 29 Dec 2018 02:39:14 +0100 (CET) From: Danny Milosavljevic Date: Sat, 29 Dec 2018 02:39:06 +0100 Message-Id: <20181229013906.17705-5-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013906.17705-1-dannym@scratchpost.org> References: <20181229013245.12853-1-dannym@scratchpost.org> <20181229013906.17705-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-cli): New variable. --- gnu/packages/docker.scm | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 3ca2fadfd..cbf84aecf 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -27,6 +27,7 @@ #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) + #:use-module (gnu packages autotools) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages golang) @@ -341,3 +342,65 @@ management, secret management, configuration management, networking, provisioning etc.") (home-page "https://mobyproject.org/") (license license:asl2.0))) + +(define-public docker-cli + (package + (name "docker-cli") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/cli.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ivisys20kphvbqlazc3bsg7pk0ykj9gjx5d4yg439x4n13jxwvb")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/docker/cli" + ;; TODO: Tests require a running Docker daemon. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'setup-environment-2 + (lambda _ + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + + ;; Make build reproducible. + (setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00") + (symlink "src/github.com/docker/cli/scripts" "./scripts") + (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile") + #t)) + (replace 'build + (lambda _ + (invoke "./scripts/build/dynbinary"))) + (replace 'check + (lambda* (#:key make-flags tests? #:allow-other-keys) + (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH"))) + (if tests? + ;; Use the newly-built docker client for the tests. + (with-directory-excursion "src/github.com/docker/cli" + ;; TODO: Run test-e2e as well? + (apply invoke "make" "-f" "docker.Makefile" "test-unit" + (or make-flags '()))) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (chdir "build") + (install-file (readlink "docker") out-bin) + (install-file "docker" out-bin) + #t)))))) + (native-inputs + `(("go" ,go) + ("libltdl" ,libltdl) + ("pkg-config" ,pkg-config))) + (synopsis "Command line interface to Docker") + (description "This package provides a command line interface to Docker.") + (home-page "http://www.docker.com/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v3 3/4] services: Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154616342111443 (code B ref 33893); Sun, 30 Dec 2018 09:51:02 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 09:50:21 +0000 Received: from localhost ([127.0.0.1]:41830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdXjh-0002yU-FH for submit@debbugs.gnu.org; Sun, 30 Dec 2018 04:50:21 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:47206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdXjf-0002yM-BI for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 04:50:19 -0500 Received: from localhost (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 352A0336030D for <33893@debbugs.gnu.org>; Sun, 30 Dec 2018 10:50:18 +0100 (CET) Date: Sun, 30 Dec 2018 10:50:12 +0100 From: Danny Milosavljevic Message-ID: <20181230105012.75f6b1a0@scratchpost.org> In-Reply-To: <20181229013906.17705-4-dannym@scratchpost.org> References: <20181229013245.12853-1-dannym@scratchpost.org> <20181229013906.17705-1-dannym@scratchpost.org> <20181229013906.17705-4-dannym@scratchpost.org> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/PIQGiPtuL7A28nZ=tI=1gRL"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --Sig_/PIQGiPtuL7A28nZ=tI=1gRL Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Better with this additional patch: diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index e592185f8..19d7e598f 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -72,7 +72,10 @@ (provision '(dockerd)) (requirement '(containerd)) (start #~(make-forkexec-constructor - (list (string-append #$docker "/bin/dockerd")))) + (list (string-append #$docker "/bin/dockerd") + "-p" "/var/run/docker.pid") + #:pid-file "/var/run/docker.pid" + #:log-file "/var/log/docker.log")) (stop #~(make-kill-destructor))))) =20 (define docker-service-type --Sig_/PIQGiPtuL7A28nZ=tI=1gRL Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlwolNQACgkQ5xo1VCww uqWwWwgAosFFGb4Ou3eqQIeNIX+RNTccw5nOC2MakIATWmRKIkdMXHUaGNE/S8vQ ES/Hnbz8ZIsUiA6UhGweHup1ltaCwyz7/d0g1oqhq7sUXS7TP/ioVPGca6vLD4Nl hk9GRyauop8GeTdM5aMKfeJAZv/pbDuNuGWaQcyeUtX1BZDgjTpOk8WJOYQnec2C c6IJ2oCuy37Ee9dRbPGYmhRpPeDc9wt575tL+QB1MAdXdqTc9N/c4F1K14OJWzLG HeYtwtAYgIGboXsZrGHdYXF5XHSb0SJb9J1+stFEHqhlk0nv2QiTv36duxRWdhId 6Iye+3Ux1Sryjx+CnNC4kAP4rpr7LQ== =Lg4Z -----END PGP SIGNATURE----- --Sig_/PIQGiPtuL7A28nZ=tI=1gRL-- From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v4 0/4] Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 12:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154617229326688 (code B ref 33893); Sun, 30 Dec 2018 12:19:01 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 12:18:13 +0000 Received: from localhost ([127.0.0.1]:41880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda2n-0006wO-3d for submit@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:13 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:58762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda2l-0006wE-H8 for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:12 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E087333606B0; Sun, 30 Dec 2018 13:18:07 +0100 (CET) From: Danny Milosavljevic Date: Sun, 30 Dec 2018 13:17:50 +0100 Message-Id: <20181230121754.775-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181229013906.17705-1-dannym@scratchpost.org> References: <20181229013906.17705-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) Now with macro. Danny Milosavljevic (4): gnu: Add containerd. gnu: Add docker-engine. services: Add docker. gnu: Add docker-cli. doc/guix.texi | 10 ++ gnu/local.mk | 1 + gnu/packages/docker.scm | 261 +++++++++++++++++++++++++++++++++++++++- gnu/services/docker.scm | 93 ++++++++++++++ 4 files changed, 364 insertions(+), 1 deletion(-) create mode 100644 gnu/services/docker.scm From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v4 1/4] gnu: Add containerd. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 12:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154617229926709 (code B ref 33893); Sun, 30 Dec 2018 12:19:02 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 12:18:19 +0000 Received: from localhost ([127.0.0.1]:41883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda2t-0006wi-BA for submit@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:19 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:58770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda2r-0006wb-O6 for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:18 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id A9E7733606B0; Sun, 30 Dec 2018 13:18:13 +0100 (CET) From: Danny Milosavljevic Date: Sun, 30 Dec 2018 13:17:51 +0100 Message-Id: <20181230121754.775-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230121754.775-1-dannym@scratchpost.org> References: <20181229013906.17705-1-dannym@scratchpost.org> <20181230121754.775-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (containerd): New variable. --- gnu/packages/docker.scm | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index c58f3f3ca..f4e676a9f 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,9 +23,13 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages golang) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-web)) @@ -142,3 +146,48 @@ created and all the services are started as specified in the configuration.") store API. It allows programmers to interact with a Docker registry using Python without keeping their credentials in a Docker configuration file.") (license license:asl2.0))) + +(define-public containerd + (package + (name "containerd") + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/containerd/containerd.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16zn6p1ky3yrgn53z8h9wza53ch91fj47wj5xgz6w4c57j30f66p")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/containerd/containerd" + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'chdir + (lambda _ + (chdir "src/github.com/containerd/containerd") + #t)) + (replace 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" make-flags))) + (replace 'install + (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (apply invoke "make" (string-append "DESTDIR=" out) "install" + make-flags))))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("libseccomp" ,libseccomp))) + (native-inputs + `(("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Container runtime") + (description "This package provides the container daemon for Docker. +It includes image transfer and storage, container execution and supervision, +network attachments.") + (home-page "http://containerd.io/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v4 2/4] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 12:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154617231426740 (code B ref 33893); Sun, 30 Dec 2018 12:19:02 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 12:18:34 +0000 Received: from localhost ([127.0.0.1]:41886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda37-0006xD-Ne for submit@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:34 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:58794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda35-0006x5-Ns for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:32 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E87A133606B0; Sun, 30 Dec 2018 13:18:18 +0100 (CET) From: Danny Milosavljevic Date: Sun, 30 Dec 2018 13:17:52 +0100 Message-Id: <20181230121754.775-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230121754.775-1-dannym@scratchpost.org> References: <20181229013906.17705-1-dannym@scratchpost.org> <20181230121754.775-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-engine): New variable. (%docker-version): New variable. --- gnu/packages/docker.scm | 149 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index f4e676a9f..3b6f00834 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,15 +23,20 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages golang) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-web)) + #:use-module (gnu packages python-web) + #:use-module (gnu packages virtualization)) + +(define %docker-version "18.09.0") (define-public python-docker-py (package @@ -191,3 +196,145 @@ It includes image transfer and storage, container execution and supervision, network attachments.") (home-page "http://containerd.io/") (license license:asl2.0))) + +(define-public docker-engine + (package + (name "docker-engine") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/engine.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1liqbx58grqih6m8hz9y20y5waflv19pv15l3wl64skap2bsn21c")))) + (build-system gnu-build-system) + (arguments + `(#:modules + ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build utils)) + #:imported-modules + (,@%gnu-build-system-modules + (guix build go-build-system)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + ;(substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + ; (("") "")) + (substitute* "builder/builder-next/executor_unix.go" + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (assoc-ref inputs "runc") + "/sbin/runc\"},\n"))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand = .*") + (string-append "DefaultCommand = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "daemon/daemon_unix.go" + (("DefaultShimBinary = .*") + (string-append "DefaultShimBinary = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n")) + (("DefaultRuntimeBinary = .*") + (string-append "DefaultRuntimeBinary = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + (("var defaultCommandCandidates = .*") + (string-append "var defaultCommandCandidates = []string{\"" + (assoc-ref inputs "runc") "/sbin/runc\"}"))) + (let ((source-files (filter (lambda (name) + (not (string-contains name "test"))) + (find-files "." "\\.go$")))) + (let-syntax ((substitute-LookPath + (lambda (x) + (syntax-case x () + ((substitute-LookPath source-text package + relative-path) + #`(substitute* source-files + ((#,(string-append "exec\\.LookPath\\(\"" + (syntax->datum + #'source-text) + "\")")) + (string-append "\"" + (assoc-ref inputs package) + relative-path + "\", error(nil)")))))))) + (substitute-LookPath "ps" "procps" "/bin/ps") + (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs") + (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdiskscan") + (substitute-LookPath "pvdisplay" "lvm2" "/sbin/pvdisplay") + (substitute-LookPath "blkid" "util-linux" "/sbin/blkid") + (substitute-LookPath "unpigz" "pigz" "/bin/unpigz") + (substitute-LookPath "iptables" "iptables" "/sbin/iptables") + (substitute-LookPath "ip" "iproute2" "/sbin/ip") + ; TODO: zfs ? +; TODO: getPlatformContainerdDaemonOpts ./cmd/dockerd/daemon_unix.go +; TODO: --init-path for docker-init [./cmd/dockerd/config_unix.go InitPath]; +; ./daemon/config/config.go DefaultInitBinary + ;(("LookPath") "Guix_doesnt_want_LookPath") + )) + #t)) + (replace 'configure + (lambda _ + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version)) + (setenv "AUTO_GOPATH" "1") + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + #t)) + (add-before 'build 'setup-environment + (assoc-ref go:%standard-phases 'setup-environment)) + (replace 'build + (lambda _ + ;(invoke "hack/make.sh" "binary") + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' + ;; Our LD doesn't like the statically linked relocatable things + ;; that go produces, so install the dynamic version of + ;; dockerd instead. + (invoke "hack/make.sh" "dynbinary"))) + (replace 'check + (lambda _ + ; FIXME: Those don't find any of the go packages + ; needed. Probably GOPATH/GOROOT related. + ;(invoke "hack/test/unit") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (install-file "bundles/dynbinary-daemon/dockerd" out-bin) + (install-file "bundles/dynbinary-daemon/dockerd-dev" out-bin)) + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs "out")) + ; TODO: KEEPBUNDLE=1 + ;./source/bundles/dynbinary-daemon/dockerd + ;(invoke "hack/make.sh" "install-binary") + #t))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("containerd" ,containerd) ; for containerd-shim + ("runc" ,runc) + ("iproute2" ,iproute) + ("iptables" ,iptables) + ("pigz" ,pigz) + ("procps" ,procps) + ("util-linux" ,util-linux) + ("lvm2" ,lvm2) + ("xfsprogs" ,xfsprogs))) + (native-inputs + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) + ("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Docker container component library") + (description "This package provides a framework to assemble specialized +container systems. It includes components for orchestration, image +management, secret management, configuration management, networking, +provisioning etc.") + (home-page "https://mobyproject.org/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v4 3/4] services: Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 12:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154617233526788 (code B ref 33893); Sun, 30 Dec 2018 12:19:03 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 12:18:55 +0000 Received: from localhost ([127.0.0.1]:41889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda3T-0006y0-AS for submit@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:55 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:58816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda3R-0006xs-GA for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 07:18:54 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E215C33603D6; Sun, 30 Dec 2018 13:18:35 +0100 (CET) From: Danny Milosavljevic Date: Sun, 30 Dec 2018 13:17:53 +0100 Message-Id: <20181230121754.775-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230121754.775-1-dannym@scratchpost.org> References: <20181229013906.17705-1-dannym@scratchpost.org> <20181230121754.775-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/services/docker.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document the service. --- doc/guix.texi | 10 +++++ gnu/local.mk | 1 + gnu/services/docker.scm | 93 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 gnu/services/docker.scm diff --git a/doc/guix.texi b/doc/guix.texi index fcb5b8c08..b129b1bd1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22115,6 +22115,16 @@ The following is an example @code{dicod-service} configuration. %dicod-database:gcide)))) @end example +@cindex docker +@subsubheading Docker Service + +The @code{(gnu services docker)} module provides the following service. + +@defvr {Scheme Variable} docker-service-type + +This is a service that runs @url{http://www.docker.com,Docker}, a daemon that +provides container functionality. + @node Setuid Programs @subsection Setuid Programs diff --git a/gnu/local.mk b/gnu/local.mk index 925d955a6..f6c91dcc7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -482,6 +482,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/desktop.scm \ %D%/services/dict.scm \ %D%/services/dns.scm \ + %D%/services/docker.scm \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/kerberos.scm \ diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm new file mode 100644 index 000000000..19d7e598f --- /dev/null +++ b/gnu/services/docker.scm @@ -0,0 +1,93 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services docker) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:use-module (gnu packages docker) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + + #:export (docker-configuration + docker-service-type)) + +(define-configuration docker-configuration + (docker + (package docker-engine) + "Docker daemon package.") + (containerd + (package containerd) + "containerd package.")) + +(define %docker-accounts + (list (user-group (name "docker") (system? #t)))) + +(define (%containerd-activation config) + (let ((state-dir "/var/lib/containerd")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (%docker-activation config) + (%containerd-activation config) + (let ((state-dir "/var/lib/docker")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +;; TODO: Refactor out into its own module? How to depend on it then? +(define (containerd-shepherd-service config) + (let* ((package (docker-configuration-containerd config))) + (shepherd-service + (documentation "containerd daemon.") + (provision '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/containerd")))) + (stop #~(make-kill-destructor))))) + +(define (docker-shepherd-service config) + (let* ((docker (docker-configuration-docker config))) + (shepherd-service + (documentation "Docker daemon.") + (provision '(dockerd)) + (requirement '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$docker "/bin/dockerd") + "-p" "/var/run/docker.pid") + #:pid-file "/var/run/docker.pid" + #:log-file "/var/log/docker.log")) + (stop #~(make-kill-destructor))))) + +(define docker-service-type + (service-type (name 'docker) + (extensions + (list + (service-extension activation-service-type + %docker-activation) + (service-extension shepherd-root-service-type + (lambda args + (list (apply containerd-shepherd-service args) + (apply docker-shepherd-service args)))) + (service-extension account-service-type + (const %docker-accounts)))) + (default-value (docker-configuration)))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v4 4/4] gnu: Add docker-cli. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 12:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154617234526857 (code B ref 33893); Sun, 30 Dec 2018 12:20:01 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 12:19:05 +0000 Received: from localhost ([127.0.0.1]:41892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda3c-0006z7-N4 for submit@debbugs.gnu.org; Sun, 30 Dec 2018 07:19:04 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:58830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gda3a-0006yU-HX for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 07:19:03 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 9153833603D6; Sun, 30 Dec 2018 13:18:58 +0100 (CET) From: Danny Milosavljevic Date: Sun, 30 Dec 2018 13:17:54 +0100 Message-Id: <20181230121754.775-5-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230121754.775-1-dannym@scratchpost.org> References: <20181229013906.17705-1-dannym@scratchpost.org> <20181230121754.775-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-cli): New variable. --- gnu/packages/docker.scm | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 3b6f00834..81e79c42d 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -27,6 +27,7 @@ #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) + #:use-module (gnu packages autotools) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages golang) @@ -338,3 +339,65 @@ management, secret management, configuration management, networking, provisioning etc.") (home-page "https://mobyproject.org/") (license license:asl2.0))) + +(define-public docker-cli + (package + (name "docker-cli") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/cli.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ivisys20kphvbqlazc3bsg7pk0ykj9gjx5d4yg439x4n13jxwvb")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/docker/cli" + ;; TODO: Tests require a running Docker daemon. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'setup-environment-2 + (lambda _ + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + + ;; Make build reproducible. + (setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00") + (symlink "src/github.com/docker/cli/scripts" "./scripts") + (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile") + #t)) + (replace 'build + (lambda _ + (invoke "./scripts/build/dynbinary"))) + (replace 'check + (lambda* (#:key make-flags tests? #:allow-other-keys) + (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH"))) + (if tests? + ;; Use the newly-built docker client for the tests. + (with-directory-excursion "src/github.com/docker/cli" + ;; TODO: Run test-e2e as well? + (apply invoke "make" "-f" "docker.Makefile" "test-unit" + (or make-flags '()))) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (chdir "build") + (install-file (readlink "docker") out-bin) + (install-file "docker" out-bin) + #t)))))) + (native-inputs + `(("go" ,go) + ("libltdl" ,libltdl) + ("pkg-config" ,pkg-config))) + (synopsis "Command line interface to Docker") + (description "This package provides a command line interface to Docker.") + (home-page "http://www.docker.com/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 0/4] Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 23:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154621315012772 (code B ref 33893); Sun, 30 Dec 2018 23:40:02 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 23:39:10 +0000 Received: from localhost ([127.0.0.1]:42698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfm-0003Jw-9f for submit@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:10 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:53252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfj-0003Jg-On for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:08 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id D4E223360EEB; Mon, 31 Dec 2018 00:39:05 +0100 (CET) From: Danny Milosavljevic Date: Mon, 31 Dec 2018 00:38:59 +0100 Message-Id: <20181230233903.23426-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230121754.775-1-dannym@scratchpost.org> References: <20181230121754.775-1-dannym@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) Danny Milosavljevic (4): gnu: Add containerd. gnu: Add docker-engine. services: Add docker. gnu: Add docker-cli. doc/guix.texi | 10 ++ gnu/local.mk | 1 + gnu/packages/docker.scm | 299 +++++++++++++++++++++++++++++++++++++++- gnu/services/docker.scm | 93 +++++++++++++ 4 files changed, 402 insertions(+), 1 deletion(-) create mode 100644 gnu/services/docker.scm From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 1/4] gnu: Add containerd. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 23:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154621315312800 (code B ref 33893); Sun, 30 Dec 2018 23:40:02 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 23:39:13 +0000 Received: from localhost ([127.0.0.1]:42702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfp-0003KN-Hx for submit@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:13 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:53256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfl-0003Jp-Fi for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:10 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 8019533601DE; Mon, 31 Dec 2018 00:39:08 +0100 (CET) From: Danny Milosavljevic Date: Mon, 31 Dec 2018 00:39:00 +0100 Message-Id: <20181230233903.23426-2-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230233903.23426-1-dannym@scratchpost.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (containerd): New variable. --- gnu/packages/docker.scm | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index c58f3f3ca..877800042 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,9 +23,13 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages golang) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-web)) @@ -142,3 +146,67 @@ created and all the services are started as specified in the configuration.") store API. It allows programmers to interact with a Docker registry using Python without keeping their credentials in a Docker configuration file.") (license license:asl2.0))) + +(define-public containerd + (package + (name "containerd") + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/containerd/containerd.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16zn6p1ky3yrgn53z8h9wza53ch91fj47wj5xgz6w4c57j30f66p")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/containerd/containerd" + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'chdir + (lambda _ + (chdir "src/github.com/containerd/containerd") + #t)) + (add-after 'chdir 'patch-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; TODO: Patch "socat", "unpigz". + (substitute* "./runtime/v1/linux/runtime.go" + (("defaultRuntime[ \t]*=.*") + (string-append "defaultRuntime = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n")) + (("defaultShim[ \t]*=.*") + (string-append "defaultShim = \"" + (assoc-ref outputs "out") + "/bin/containerd-shim\"\n"))) + (substitute* "./vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand[ \t]*=.*") + (string-append "DefaultCommand = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + #t)) + (replace 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" make-flags))) + (replace 'install + (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (apply invoke "make" (string-append "DESTDIR=" out) "install" + make-flags))))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("libseccomp" ,libseccomp) + ("runc" ,runc))) + (native-inputs + `(("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Container runtime") + (description "This package provides the container daemon for Docker. +It includes image transfer and storage, container execution and supervision, +network attachments.") + (home-page "http://containerd.io/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 23:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154621315412815 (code B ref 33893); Sun, 30 Dec 2018 23:40:03 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 23:39:14 +0000 Received: from localhost ([127.0.0.1]:42705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfp-0003KP-SN for submit@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:14 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:53266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfn-0003K4-Ec for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:12 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 4EFAC3360EEB; Mon, 31 Dec 2018 00:39:10 +0100 (CET) From: Danny Milosavljevic Date: Mon, 31 Dec 2018 00:39:01 +0100 Message-Id: <20181230233903.23426-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230233903.23426-1-dannym@scratchpost.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-engine): New variable. (%docker-version): New variable. --- gnu/packages/docker.scm | 168 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 167 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 877800042..a3510529a 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -23,15 +23,20 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages golang) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-web)) + #:use-module (gnu packages python-web) + #:use-module (gnu packages virtualization)) + +(define %docker-version "18.09.0") (define-public python-docker-py (package @@ -210,3 +215,164 @@ It includes image transfer and storage, container execution and supervision, network attachments.") (home-page "http://containerd.io/") (license license:asl2.0))) + +(define-public docker-engine + (package + (name "docker-engine") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/engine.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1liqbx58grqih6m8hz9y20y5waflv19pv15l3wl64skap2bsn21c")))) + (build-system gnu-build-system) + (arguments + `(#:modules + ((guix build gnu-build-system) + ((guix build go-build-system) #:prefix go:) + (guix build utils)) + #:imported-modules + (,@%gnu-build-system-modules + (guix build go-build-system)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + ;(substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + ; (("") "")) + (substitute* "builder/builder-next/executor_unix.go" + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (assoc-ref inputs "runc") + "/sbin/runc\"},\n"))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand = .*") + (string-append "DefaultCommand = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go" + (("defaultRuntime[ \t]*=.*") + (string-append "defaultRuntime = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n")) + (("defaultShim[ \t]*=.*") + (string-append "defaultShim = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n"))) + (substitute* "daemon/daemon_unix.go" + (("DefaultShimBinary = .*") + (string-append "DefaultShimBinary = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n")) + (("DefaultRuntimeBinary = .*") + (string-append "DefaultRuntimeBinary = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n")) + (("DefaultRuntimeName = .*") + (string-append "DefaultRuntimeName = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + (substitute* "daemon/config/config.go" + (("StockRuntimeName = .*") + (string-append "StockRuntimeName = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) + ; TODO DefaultInitBinary + + (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + (("var defaultCommandCandidates = .*") + (string-append "var defaultCommandCandidates = []string{\"" + (assoc-ref inputs "runc") "/sbin/runc\"}"))) + (let ((source-files (filter (lambda (name) + (not (string-contains name "test"))) + (find-files "." "\\.go$")))) + (let-syntax ((substitute-LookPath + (lambda (x) + (syntax-case x () + ((substitute-LookPath source-text package + relative-path) + #`(substitute* source-files + ((#,(string-append "exec\\.LookPath\\(\"" + (syntax->datum + #'source-text) + "\")")) + (string-append "\"" + (assoc-ref inputs package) + relative-path + "\", error(nil)")))))))) + (substitute-LookPath "ps" "procps" "/bin/ps") + (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs") + (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdiskscan") + (substitute-LookPath "pvdisplay" "lvm2" "/sbin/pvdisplay") + (substitute-LookPath "blkid" "util-linux" "/sbin/blkid") + (substitute-LookPath "unpigz" "pigz" "/bin/unpigz") + (substitute-LookPath "iptables" "iptables" "/sbin/iptables") + (substitute-LookPath "ip" "iproute2" "/sbin/ip") + ; TODO: zfs ? +; TODO: getPlatformContainerdDaemonOpts ./cmd/dockerd/daemon_unix.go +; TODO: --init-path for docker-init [./cmd/dockerd/config_unix.go InitPath]; + ;(("LookPath") "Guix_doesnt_want_LookPath") + )) + #t)) + (replace 'configure + (lambda _ + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version)) + (setenv "AUTO_GOPATH" "1") + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + #t)) + (add-before 'build 'setup-environment + (assoc-ref go:%standard-phases 'setup-environment)) + (replace 'build + (lambda _ + ;(invoke "hack/make.sh" "binary") + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' + ;; Our LD doesn't like the statically linked relocatable things + ;; that go produces, so install the dynamic version of + ;; dockerd instead. + (invoke "hack/make.sh" "dynbinary"))) + (replace 'check + (lambda _ + ; FIXME: Those don't find any of the go packages + ; needed. Probably GOPATH/GOROOT related. + ;(invoke "hack/test/unit") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (install-file "bundles/dynbinary-daemon/dockerd" out-bin) + (install-file "bundles/dynbinary-daemon/dockerd-dev" out-bin)) + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs "out")) + ; TODO: KEEPBUNDLE=1 + ;./source/bundles/dynbinary-daemon/dockerd + ;(invoke "hack/make.sh" "install-binary") + #t))))) + (inputs + `(("btrfs-progs" ,btrfs-progs) + ("containerd" ,containerd) ; for containerd-shim + ("runc" ,runc) + ("iproute2" ,iproute) + ("iptables" ,iptables) + ("pigz" ,pigz) + ("procps" ,procps) + ("util-linux" ,util-linux) + ("lvm2" ,lvm2) + ("xfsprogs" ,xfsprogs))) + (native-inputs + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) + ("go" ,go) + ("pkg-config" ,pkg-config))) + (synopsis "Docker container component library") + (description "This package provides a framework to assemble specialized +container systems. It includes components for orchestration, image +management, secret management, configuration management, networking, +provisioning etc.") + (home-page "https://mobyproject.org/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 3/4] services: Add docker. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 23:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154621315512821 (code B ref 33893); Sun, 30 Dec 2018 23:40:03 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 23:39:15 +0000 Received: from localhost ([127.0.0.1]:42707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfq-0003Ke-Fu for submit@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:14 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:53274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfo-0003KD-Kk for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:13 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 9603433601DE; Mon, 31 Dec 2018 00:39:11 +0100 (CET) From: Danny Milosavljevic Date: Mon, 31 Dec 2018 00:39:02 +0100 Message-Id: <20181230233903.23426-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230233903.23426-1-dannym@scratchpost.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/services/docker.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document the service. --- doc/guix.texi | 10 +++++ gnu/local.mk | 1 + gnu/services/docker.scm | 93 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 gnu/services/docker.scm diff --git a/doc/guix.texi b/doc/guix.texi index fcb5b8c08..b129b1bd1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22115,6 +22115,16 @@ The following is an example @code{dicod-service} configuration. %dicod-database:gcide)))) @end example +@cindex docker +@subsubheading Docker Service + +The @code{(gnu services docker)} module provides the following service. + +@defvr {Scheme Variable} docker-service-type + +This is a service that runs @url{http://www.docker.com,Docker}, a daemon that +provides container functionality. + @node Setuid Programs @subsection Setuid Programs diff --git a/gnu/local.mk b/gnu/local.mk index 925d955a6..f6c91dcc7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -482,6 +482,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/desktop.scm \ %D%/services/dict.scm \ %D%/services/dns.scm \ + %D%/services/docker.scm \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/kerberos.scm \ diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm new file mode 100644 index 000000000..19d7e598f --- /dev/null +++ b/gnu/services/docker.scm @@ -0,0 +1,93 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services docker) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:use-module (gnu packages docker) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + + #:export (docker-configuration + docker-service-type)) + +(define-configuration docker-configuration + (docker + (package docker-engine) + "Docker daemon package.") + (containerd + (package containerd) + "containerd package.")) + +(define %docker-accounts + (list (user-group (name "docker") (system? #t)))) + +(define (%containerd-activation config) + (let ((state-dir "/var/lib/containerd")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (%docker-activation config) + (%containerd-activation config) + (let ((state-dir "/var/lib/docker")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +;; TODO: Refactor out into its own module? How to depend on it then? +(define (containerd-shepherd-service config) + (let* ((package (docker-configuration-containerd config))) + (shepherd-service + (documentation "containerd daemon.") + (provision '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/containerd")))) + (stop #~(make-kill-destructor))))) + +(define (docker-shepherd-service config) + (let* ((docker (docker-configuration-docker config))) + (shepherd-service + (documentation "Docker daemon.") + (provision '(dockerd)) + (requirement '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$docker "/bin/dockerd") + "-p" "/var/run/docker.pid") + #:pid-file "/var/run/docker.pid" + #:log-file "/var/log/docker.log")) + (stop #~(make-kill-destructor))))) + +(define docker-service-type + (service-type (name 'docker) + (extensions + (list + (service-extension activation-service-type + %docker-activation) + (service-extension shepherd-root-service-type + (lambda args + (list (apply containerd-shepherd-service args) + (apply docker-shepherd-service args)))) + (service-extension account-service-type + (const %docker-accounts)))) + (default-value (docker-configuration)))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 4/4] gnu: Add docker-cli. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Dec 2018 23:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33893@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154621316112835 (code B ref 33893); Sun, 30 Dec 2018 23:40:04 +0000 Received: (at 33893) by debbugs.gnu.org; 30 Dec 2018 23:39:21 +0000 Received: from localhost ([127.0.0.1]:42709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfx-0003Kw-09 for submit@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:21 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:53278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdkfp-0003KG-Gd for 33893@debbugs.gnu.org; Sun, 30 Dec 2018 18:39:14 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 93C2433624F8; Mon, 31 Dec 2018 00:39:12 +0100 (CET) From: Danny Milosavljevic Date: Mon, 31 Dec 2018 00:39:03 +0100 Message-Id: <20181230233903.23426-5-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181230233903.23426-1-dannym@scratchpost.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/docker.scm (docker-cli): New variable. --- gnu/packages/docker.scm | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index a3510529a..19b4d504f 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -27,6 +27,7 @@ #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (guix utils) + #:use-module (gnu packages autotools) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages golang) @@ -376,3 +377,65 @@ management, secret management, configuration management, networking, provisioning etc.") (home-page "https://mobyproject.org/") (license license:asl2.0))) + +(define-public docker-cli + (package + (name "docker-cli") + (version %docker-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/cli.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ivisys20kphvbqlazc3bsg7pk0ykj9gjx5d4yg439x4n13jxwvb")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/docker/cli" + ;; TODO: Tests require a running Docker daemon. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'setup-environment-2 + (lambda _ + ;; Respectively, strip the symbol table and debug + ;; information, and the DWARF symbol table. + (setenv "LDFLAGS" "-s -w") + + ;; Make build reproducible. + (setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00") + (symlink "src/github.com/docker/cli/scripts" "./scripts") + (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile") + #t)) + (replace 'build + (lambda _ + (invoke "./scripts/build/dynbinary"))) + (replace 'check + (lambda* (#:key make-flags tests? #:allow-other-keys) + (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH"))) + (if tests? + ;; Use the newly-built docker client for the tests. + (with-directory-excursion "src/github.com/docker/cli" + ;; TODO: Run test-e2e as well? + (apply invoke "make" "-f" "docker.Makefile" "test-unit" + (or make-flags '()))) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-bin (string-append out "/bin"))) + (chdir "build") + (install-file (readlink "docker") out-bin) + (install-file "docker" out-bin) + #t)))))) + (native-inputs + `(("go" ,go) + ("libltdl" ,libltdl) + ("pkg-config" ,pkg-config))) + (synopsis "Command line interface to Docker") + (description "This package provides a command line interface to Docker.") + (home-page "http://www.docker.com/") + (license license:asl2.0))) From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 1/4] gnu: Add containerd. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jan 2019 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154680570223561 (code B ref 33893); Sun, 06 Jan 2019 20:16:02 +0000 Received: (at 33893) by debbugs.gnu.org; 6 Jan 2019 20:15:02 +0000 Received: from localhost ([127.0.0.1]:49039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggEp4-00067l-HS for submit@debbugs.gnu.org; Sun, 06 Jan 2019 15:15:02 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggEp3-00067I-0L for 33893@debbugs.gnu.org; Sun, 06 Jan 2019 15:15:01 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 918141295; Sun, 6 Jan 2019 21:15:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zQtbrboP8rbi; Sun, 6 Jan 2019 21:15:00 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id DDF361289; Sun, 6 Jan 2019 21:14:59 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-2-dannym@scratchpost.org> Date: Sun, 06 Jan 2019 21:14:59 +0100 In-Reply-To: <20181230233903.23426-2-dannym@scratchpost.org> (Danny Milosavljevic's message of "Mon, 31 Dec 2018 00:39:00 +0100") Message-ID: <87tvily24c.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) 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: -0.0 (/) Hello, Danny Milosavljevic skribis: > * gnu/packages/docker.scm (containerd): New variable. LGTM, thanks! Ludo=E2=80=99. From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jan 2019 20:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154680603924091 (code B ref 33893); Sun, 06 Jan 2019 20:21:02 +0000 Received: (at 33893) by debbugs.gnu.org; 6 Jan 2019 20:20:39 +0000 Received: from localhost ([127.0.0.1]:49042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggEuV-0006GT-7k for submit@debbugs.gnu.org; Sun, 06 Jan 2019 15:20:39 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggEuT-0006GJ-KS for 33893@debbugs.gnu.org; Sun, 06 Jan 2019 15:20:38 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id F09B41296; Sun, 6 Jan 2019 21:20:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3YdxVL2m8jK7; Sun, 6 Jan 2019 21:20:36 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 216451164; Sun, 6 Jan 2019 21:20:36 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> Date: Sun, 06 Jan 2019 21:20:35 +0100 In-Reply-To: <20181230233903.23426-3-dannym@scratchpost.org> (Danny Milosavljevic's message of "Mon, 31 Dec 2018 00:39:01 +0100") Message-ID: <87pnt9y1v0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) 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: -0.0 (/) Danny Milosavljevic skribis: > * gnu/packages/docker.scm (docker-engine): New variable. > (%docker-version): New variable. [...] > + ;(("LookPath") "Guix_doesnt_want_LookPath") No longer needed? > + (replace 'configure > + (lambda _ > + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-vers= ion)) > + (setenv "AUTO_GOPATH" "1") Could you add a comment saying what AUTO_GOPATH does? > + (replace 'build > + (lambda _ > + ;(invoke "hack/make.sh" "binary") > + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' It=E2=80=99s not clear to me what should be fixed; perhaps a leftover? > + (replace 'check > + (lambda _ > + ; FIXME: Those don't find any of the go packages > + ; needed. Probably GOPATH/GOROOT related. > + ;(invoke "hack/test/unit") > + #t)) That=E2=80=99s potentially problematic. :-) Any idea how difficult it wou= ld be to run these tests? > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (out-bin (string-append out "/bin"))) > + (install-file "bundles/dynbinary-daemon/dockerd" out-bin) > + (install-file "bundles/dynbinary-daemon/dockerd-dev" out-= bin)) > + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs "o= ut")) > + ; TODO: KEEPBUNDLE=3D1 > + ;./source/bundles/dynbinary-daemon/dockerd > + ;(invoke "hack/make.sh" "install-binary") Comments can be removed? Otherwise LGTM, thanks! Ludo=E2=80=99. From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 3/4] services: Add docker. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jan 2019 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154680666525160 (code B ref 33893); Sun, 06 Jan 2019 20:32:02 +0000 Received: (at 33893) by debbugs.gnu.org; 6 Jan 2019 20:31:05 +0000 Received: from localhost ([127.0.0.1]:49045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggF4b-0006Xk-FI for submit@debbugs.gnu.org; Sun, 06 Jan 2019 15:31:05 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggF4Z-0006Xa-7C for 33893@debbugs.gnu.org; Sun, 06 Jan 2019 15:31:03 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9A59C1164; Sun, 6 Jan 2019 21:31:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cn-SzJJ6I8hY; Sun, 6 Jan 2019 21:31:01 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6725EFA1; Sun, 6 Jan 2019 21:31:01 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-4-dannym@scratchpost.org> Date: Sun, 06 Jan 2019 21:31:00 +0100 In-Reply-To: <20181230233903.23426-4-dannym@scratchpost.org> (Danny Milosavljevic's message of "Mon, 31 Dec 2018 00:39:02 +0100") Message-ID: <87ftu5y1dn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) 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: -0.0 (/) Danny Milosavljevic skribis: > * gnu/services/docker.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi (Miscellaneous Services): Document the service. Nice! > +@cindex docker =E2=80=9CDocker=E2=80=9D with a capital. > +@subsubheading Docker Service > + > +The @code{(gnu services docker)} module provides the following service. > + > +@defvr {Scheme Variable} docker-service-type > + > +This is a service that runs @url{http://www.docker.com,Docker}, a daemon= that > +provides container functionality. > + We=E2=80=99re missing =E2=80=9C@end defvr=E2=80=9D I guess. I think we shouldn=E2=80=99t propagate the narrative that Docker =3D contai= ner. So what about something like: This is the type of the service that runs @url{=E2=80=A6, Docker}, a daem= on that can execute application bundles (sometimes referred to as ``containers'') in isolated environments. ? Also could you document =E2=80=98docker-configuration=E2=80=99 as well? [...] > +;; TODO: Refactor out into its own module? How to depend on it then? > +(define (containerd-shepherd-service config) > + (let* ((package (docker-configuration-containerd config))) > + (shepherd-service > + (documentation "containerd daemon.") > + (provision '(containerd)) > + (start #~(make-forkexec-constructor > + (list (string-append #$package "/bin/containerd")))) > + (stop #~(make-kill-destructor))))) I suppose there could be a separate =E2=80=98containerd-service-type=E2=80= =99 if it=E2=80=99s useful; if it=E2=80=99s not, it=E2=80=99s OK to keep it this way. As for the dependency, users would have to add both docker and containerd to their service list, or docker-service-type could extend containerd-service-type, which would ensure containerd-service-type is automatically instantiated if it=E2=80=99s not already in the user=E2=80=99= s service list. > +(define docker-service-type > + (service-type (name 'docker) > + (extensions > + (list > + (service-extension activation-service-type > + %docker-activation) > + (service-extension shepherd-root-service-type > + (lambda args > + (list (apply containerd-shepherd-= service args) > + (apply docker-shepherd-serv= ice args)))) You can make the above (lambda (config) =E2=80=A6) instead of (lambda (args= ) =E2=80=A6). > + (service-extension account-service-type > + (const %docker-accounts)))) > + (default-value (docker-configuration)))) Please add a =E2=80=98description=E2=80=99 field here, and please remove ta= bs from the file. :-) Could you consider adding a system test for docker/containerd? Perhaps we could go as far as using =E2=80=98docker-image=E2=80=99 in (guix scripts= pack) to generate an image and make sure =E2=80=98docker load=E2=80=99 works, but ma= ybe that=E2=80=99s too much work. Thank you, Ludo=E2=80=99. From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 4/4] gnu: Add docker-cli. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jan 2019 20:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154680679625384 (code B ref 33893); Sun, 06 Jan 2019 20:34:01 +0000 Received: (at 33893) by debbugs.gnu.org; 6 Jan 2019 20:33:16 +0000 Received: from localhost ([127.0.0.1]:49048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggF6h-0006bL-V8 for submit@debbugs.gnu.org; Sun, 06 Jan 2019 15:33:16 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggF6g-0006bD-Ai for 33893@debbugs.gnu.org; Sun, 06 Jan 2019 15:33:14 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id CA4E51164; Sun, 6 Jan 2019 21:33:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pccb9fIB2OO0; Sun, 6 Jan 2019 21:33:13 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 101ACFA1; Sun, 6 Jan 2019 21:33:12 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-5-dannym@scratchpost.org> Date: Sun, 06 Jan 2019 21:33:12 +0100 In-Reply-To: <20181230233903.23426-5-dannym@scratchpost.org> (Danny Milosavljevic's message of "Mon, 31 Dec 2018 00:39:03 +0100") Message-ID: <87bm4ty19z.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) 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: -0.0 (/) Danny Milosavljevic skribis: > * gnu/packages/docker.scm (docker-cli): New variable. [...] > + (arguments > + `(#:import-path "github.com/docker/cli" > + ;; TODO: Tests require a running Docker daemon. > + #:tests? #f I suppose we cannot run the daemon in the build environment, can we? Or is it possible to use some of the tests? > + (native-inputs > + `(("go" ,go) > + ("libltdl" ,libltdl) Shouldn=E2=80=99t libltdl be an input? Otherwise LGTM, thanks! Ludo=E2=80=99. From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Jan 2019 18:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33893@debbugs.gnu.org, Leo Famulari Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154688671214645 (code B ref 33893); Mon, 07 Jan 2019 18:46:01 +0000 Received: (at 33893) by debbugs.gnu.org; 7 Jan 2019 18:45:12 +0000 Received: from localhost ([127.0.0.1]:48944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggZtg-0003o8-43 for submit@debbugs.gnu.org; Mon, 07 Jan 2019 13:45:12 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggZtf-0003o1-0d for 33893@debbugs.gnu.org; Mon, 07 Jan 2019 13:45:11 -0500 Received: from localhost (77.116.186.240.wireless.dyn.drei.com [77.116.186.240]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 28E593360693; Mon, 7 Jan 2019 19:45:09 +0100 (CET) Date: Mon, 7 Jan 2019 19:44:55 +0100 From: Danny Milosavljevic Message-ID: <20190107194455.69823f82@scratchpost.org> In-Reply-To: <87pnt9y1v0.fsf@gnu.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/S.8OBd/xNh0c1.Ea69VcqPK"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --Sig_/S.8OBd/xNh0c1.Ea69VcqPK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Sun, 06 Jan 2019 21:20:35 +0100 Ludovic Court=C3=A8s wrote: > Danny Milosavljevic skribis: >=20 > > * gnu/packages/docker.scm (docker-engine): New variable. > > (%docker-version): New variable. =20 >=20 > [...] >=20 > > + ;(("LookPath") "Guix_doesnt_want_LookPath") =20 >=20 > No longer needed? It was meant as a detector in order to make compilation fail when, in future versions, docker wants to invok new stuff that we didn't patch yet. Should we do that? > > + (replace 'configure > > + (lambda _ > > + (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-ve= rsion)) > > + (setenv "AUTO_GOPATH" "1") =20 >=20 > Could you add a comment saying what AUTO_GOPATH does? Yes, I'll add one. > > + (replace 'build > > + (lambda _ > > + ;(invoke "hack/make.sh" "binary") > > + ; FIXME: bash -c 'hack/validate/default && hack/make.sh' = =20 >=20 > It=E2=80=99s not clear to me what should be fixed; perhaps a leftover? Yeah, I meant to check what hack/validate/default does and it seems to do developer-specific tests (commit message formatted the right way etc), so I guess we can just not invoke it. > > + (replace 'check > > + (lambda _ > > + ; FIXME: Those don't find any of the go packages > > + ; needed. Probably GOPATH/GOROOT related. > > + ;(invoke "hack/test/unit") > > + #t)) =20 >=20 > That=E2=80=99s potentially problematic. :-) Any idea how difficult it w= ould be > to run these tests? Go has peculiar ideas of how the directory layout is supposed to be set up. I could probably figure it out - but if someone with more Go knowledge could step forward it would be much faster. > > + (replace 'install > > + (lambda* (#:key outputs #:allow-other-keys) > > + (let* ((out (assoc-ref outputs "out")) > > + (out-bin (string-append out "/bin"))) > > + (install-file "bundles/dynbinary-daemon/dockerd" out-bi= n) > > + (install-file "bundles/dynbinary-daemon/dockerd-dev" ou= t-bin)) > > + ;(setenv "DOCKER_MAKE_INSTALL_PREFIX" (assoc-ref outputs = "out")) > > + ; TODO: KEEPBUNDLE=3D1 > > + ;./source/bundles/dynbinary-daemon/dockerd > > + ;(invoke "hack/make.sh" "install-binary") =20 >=20 > Comments can be removed? Yeah. Thanks! --Sig_/S.8OBd/xNh0c1.Ea69VcqPK Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlwznicACgkQ5xo1VCww uqU13Qf/X56xpbhPZf+HKBrRgQgt5SI1yC7uMV3fpZERiApWi2xKq7Jask1JX25/ qENdd01e/7H8h/BbtiBRV7mFNtqMcHC7wmm3ntIRp/Mk4FwCU97oZ0jJlBvqhOxq 92/Lywb3m4OaVh+1P0OEmAU+jluER8i9zx4Gj9L8zl9XYnp3im5ZaZTdpwDvQzyF TM3eKc268RFHBiwi8djpOXLm7g7TKbW7voD78sRZDpFwIvv3fCl9uhpGCfMWjhPL jUfRmh52hxnyg41cJmBseIRzwE0vQRcdxVfx9rm0AFFZbmYqpq8tWx5odLl1Yz6y FyOTRyyhbXrV2OpdCBr3LpdW0aixlA== =MQVW -----END PGP SIGNATURE----- --Sig_/S.8OBd/xNh0c1.Ea69VcqPK-- From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Jan 2019 08:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 33893@debbugs.gnu.org, Leo Famulari Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.15469369394553 (code B ref 33893); Tue, 08 Jan 2019 08:43:02 +0000 Received: (at 33893) by debbugs.gnu.org; 8 Jan 2019 08:42:19 +0000 Received: from localhost ([127.0.0.1]:49215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggmxn-0001BN-Ai for submit@debbugs.gnu.org; Tue, 08 Jan 2019 03:42:19 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:37386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggmxl-0001BD-Dn for 33893@debbugs.gnu.org; Tue, 08 Jan 2019 03:42:17 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E99FB493; Tue, 8 Jan 2019 09:42:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2R9ttXOPk9Cp; Tue, 8 Jan 2019 09:42:15 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id ED2AE354; Tue, 8 Jan 2019 09:42:14 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> <20190107194455.69823f82@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?UTF-8?Q?Niv=C3=B4se?= an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 08 Jan 2019 09:42:14 +0100 In-Reply-To: <20190107194455.69823f82@scratchpost.org> (Danny Milosavljevic's message of "Mon, 7 Jan 2019 19:44:55 +0100") Message-ID: <87va2z1qxl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) 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: -0.0 (/) Hello, Danny Milosavljevic skribis: > On Sun, 06 Jan 2019 21:20:35 +0100 > Ludovic Court=C3=A8s wrote: > >> Danny Milosavljevic skribis: >>=20 >> > * gnu/packages/docker.scm (docker-engine): New variable. >> > (%docker-version): New variable.=20=20 >>=20 >> [...] >>=20 >> > + ;(("LookPath") "Guix_doesnt_want_LookPath")=20=20 >>=20 >> No longer needed? > > It was meant as a detector in order to make compilation fail when, in fut= ure > versions, docker wants to invok new stuff that we didn't patch yet. > Should we do that? I see, it sounds like a good idea. Also add a comment explaining the rationale. >> > + (replace 'build >> > + (lambda _ >> > + ;(invoke "hack/make.sh" "binary") >> > + ; FIXME: bash -c 'hack/validate/default && hack/make.sh'= =20=20 >>=20 >> It=E2=80=99s not clear to me what should be fixed; perhaps a leftover? > > Yeah, I meant to check what hack/validate/default does and it seems to do > developer-specific tests (commit message formatted the right way etc), so > I guess we can just not invoke it. OK. >> > + (replace 'check >> > + (lambda _ >> > + ; FIXME: Those don't find any of the go packages >> > + ; needed. Probably GOPATH/GOROOT related. >> > + ;(invoke "hack/test/unit") >> > + #t))=20=20 >>=20 >> That=E2=80=99s potentially problematic. :-) Any idea how difficult it = would be >> to run these tests? > > Go has peculiar ideas of how the directory layout is supposed to be set u= p. > I could probably figure it out - but if someone with more Go knowledge co= uld > step forward it would be much faster. I see Leo is Cc=E2=80=99d so we=E2=80=99ll see. :-) Thank you, Ludo=E2=80=99. From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Jan 2019 02:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Leo Famulari Cc: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.15470869377464 (code B ref 33893); Thu, 10 Jan 2019 02:23:02 +0000 Received: (at 33893) by debbugs.gnu.org; 10 Jan 2019 02:22:17 +0000 Received: from localhost ([127.0.0.1]:52825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghPz6-0001wK-Uh for submit@debbugs.gnu.org; Wed, 09 Jan 2019 21:22:17 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:51326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghPz4-0001wB-J3 for 33893@debbugs.gnu.org; Wed, 09 Jan 2019 21:22:15 -0500 Received: from localhost (77.116.226.247.wireless.dyn.drei.com [77.116.226.247]) by dd26836.kasserver.com (Postfix) with ESMTPSA id D7339336601A; Thu, 10 Jan 2019 03:22:12 +0100 (CET) Date: Thu, 10 Jan 2019 03:22:10 +0100 From: Danny Milosavljevic Message-ID: <20190110032210.1242af1f@scratchpost.org> In-Reply-To: <87va2z1qxl.fsf@gnu.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> <20190107194455.69823f82@scratchpost.org> <87va2z1qxl.fsf@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/RaopOrGzekeyiIby8Epi=o1"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --Sig_/RaopOrGzekeyiIby8Epi=o1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Hi Leo, On Tue, 08 Jan 2019 09:42:14 +0100 Ludovic Court=C3=A8s wrote: > > Go has peculiar ideas of how the directory layout is supposed to be set= up. > > I could probably figure it out - but if someone with more Go knowledge = could > > step forward it would be much faster. =20 >=20 > I see Leo is Cc=E2=80=99d so we=E2=80=99ll see. :-) Nevermind, I've fixed it and learned something in the process: Linux doesn't actually know the current working directory as a string. It only knows the inode, so if you call getcwd, what libc actually does is it opendirs "..", then finds the entry with the same inode number as the current directory, and then returns the name of that entry. Now, gopath uses symlinks to set up their preferred directory hierarchy in such a way: ln -s ../../../.. .gopath/src/github.com/docker/docker Now if you chdir into ".gopath/src/github.com/docker/docker" and then Go la= ter does getcwd, it will appear as if the chdir did not succeed (because it will just use the old working directory because it has the same inode). So Go was erroring out because the directory structure there was *still* wr= ong. Solution: Set environment variable PWD to the correct name of the directory. I've pushed this patchset to master. I'll try to add a system test next - let's see. --Sig_/RaopOrGzekeyiIby8Epi=o1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlw2rFIACgkQ5xo1VCww uqVkmgf+NN96Dt8+cclYpjUmAzw2gOIfAEAmBoLdHCAWV+FyLIyEKiJ6gdBQqdMF rkZVtezJhwmfEc34bEEe2VB1CASaL2rN5BVHZYUBIQqrjnj05PULDNAQRbZcXh93 PElhl3a+arHS024WIlirwbvLUV7qTWnNWjvEgCDhitT64hhpVn/FWEzyremlvkuJ 0PUF6bhLzRwvoaSDAZQlRbGWAYV7yoIN2mxWDR2ZyEIDrNQ7JyTbBydWSa4rS7kB 8l0QoLFASDYd1VaPltSHKR3eITgU+rLy3incTcRbIpk8NtFQgkhbRbteCc5WgNnj lE4xAq4o6DsTtpfrOE3ObTX0GxuPJA== =vXcU -----END PGP SIGNATURE----- --Sig_/RaopOrGzekeyiIby8Epi=o1-- From unknown Fri Jun 13 06:14:00 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: Danny Milosavljevic Subject: bug#33893: closed (Re: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine.) Message-ID: References: <87k1jcew0m.fsf@gnu.org> <20181228101311.30793-1-dannym@scratchpost.org> X-Gnu-PR-Message: they-closed 33893 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 33893@debbugs.gnu.org Date: Thu, 10 Jan 2019 08:51:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1547110262-11134-1" This is a multi-part message in MIME format... ------------=_1547110262-11134-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #33893: [PATCH 0/2] Add docker. 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 33893@debbugs.gnu.org. --=20 33893: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33893 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1547110262-11134-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 33893-done) by debbugs.gnu.org; 10 Jan 2019 08:50:54 +0000 Received: from localhost ([127.0.0.1]:52922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghW3B-0002tG-US for submit@debbugs.gnu.org; Thu, 10 Jan 2019 03:50:54 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:54228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghW3A-0002t8-39 for 33893-done@debbugs.gnu.org; Thu, 10 Jan 2019 03:50:52 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B7ED8FD3; Thu, 10 Jan 2019 09:50:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4FBHK7UXJOkq; Thu, 10 Jan 2019 09:50:50 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id C62CFDAE; Thu, 10 Jan 2019 09:50:49 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> <20190107194455.69823f82@scratchpost.org> <87va2z1qxl.fsf@gnu.org> <20190110032210.1242af1f@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 =?utf-8?Q?Niv=C3=B4se?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 10 Jan 2019 09:50:49 +0100 In-Reply-To: <20190110032210.1242af1f@scratchpost.org> (Danny Milosavljevic's message of "Thu, 10 Jan 2019 03:22:10 +0100") Message-ID: <87k1jcew0m.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 33893-done Cc: 33893-done@debbugs.gnu.org, Leo Famulari 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: -0.0 (/) Howdy! Danny Milosavljevic skribis: > On Tue, 08 Jan 2019 09:42:14 +0100 > Ludovic Court=C3=A8s wrote: > >> > Go has peculiar ideas of how the directory layout is supposed to be se= t up. >> > I could probably figure it out - but if someone with more Go knowledge= could >> > step forward it would be much faster.=20=20 >>=20 >> I see Leo is Cc=E2=80=99d so we=E2=80=99ll see. :-) > > Nevermind, I've fixed it and learned something in the process: > > Linux doesn't actually know the current working directory as a string. > It only knows the inode, so if you call getcwd, what libc actually does is > it opendirs "..", then finds the entry with the same inode number as > the current directory, and then returns the name of that entry. Are you sure? In the Linux port of glibc I see this: --8<---------------cut here---------------start------------->8--- char * __getcwd (char *buf, size_t size) { char *path; char *result; // [=E2=80=A6] retval =3D INLINE_SYSCALL (getcwd, 2, path, alloc_size); --8<---------------cut here---------------end--------------->8--- And indeed, there=E2=80=99s a =E2=80=98getcwd=E2=80=99 syscall: --8<---------------cut here---------------start------------->8--- $ strace -e getcwd guile -c '(getcwd)' getcwd("/home/ludo", 100) =3D 11 +++ exited with 0 +++ --8<---------------cut here---------------end--------------->8--- > Now, gopath uses symlinks to set up their preferred directory hierarchy > in such a way: > > ln -s ../../../.. .gopath/src/github.com/docker/docker > > Now if you chdir into ".gopath/src/github.com/docker/docker" and then Go = later > does getcwd, it will appear as if the chdir did not succeed (because it w= ill > just use the old working directory because it has the same inode). > > So Go was erroring out because the directory structure there was *still* = wrong. > > Solution: Set environment variable PWD to the correct name of the directo= ry. Great that you found a solution. Thanks for taking the time to address this! Ludo=E2=80=99. ------------=_1547110262-11134-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Dec 2018 10:16:10 +0000 Received: from localhost ([127.0.0.1]:39733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpBa-0001GO-7c for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:16:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcpBY-0001G9-DK for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:16:08 -0500 Received: from lists.gnu.org ([208.118.235.17]:43907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcpBS-0007DC-Us for submit@debbugs.gnu.org; Fri, 28 Dec 2018 05:16:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcpBQ-0000CK-6S for guix-patches@gnu.org; Fri, 28 Dec 2018 05:16:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcpBL-00077R-A6 for guix-patches@gnu.org; Fri, 28 Dec 2018 05:16:00 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:42384) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcpBL-00075y-1W for guix-patches@gnu.org; Fri, 28 Dec 2018 05:15:55 -0500 Received: from dayas.3.home (77.116.200.150.wireless.dyn.drei.com [77.116.200.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 98B00336031B; Fri, 28 Dec 2018 11:15:52 +0100 (CET) From: Danny Milosavljevic To: guix-patches@gnu.org Subject: [PATCH 0/2] Add docker. Date: Fri, 28 Dec 2018 11:13:11 +0100 Message-Id: <20181228101311.30793-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 85.13.145.193 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic 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: -6.0 (------) Danny Milosavljevic (2): gnu: Add docker-engine. gnu: Add docker-cli. gnu/packages/docker.scm | 144 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) ------------=_1547110262-11134-1-- From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Jan 2019 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33893-done@debbugs.gnu.org, Leo Famulari Received: via spool by 33893-done@debbugs.gnu.org id=D33893.154712615311219 (code D ref 33893); Thu, 10 Jan 2019 13:16:02 +0000 Received: (at 33893-done) by debbugs.gnu.org; 10 Jan 2019 13:15:53 +0000 Received: from localhost ([127.0.0.1]:53046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghaBc-0002ut-Kl for submit@debbugs.gnu.org; Thu, 10 Jan 2019 08:15:52 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:46778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghaBZ-0002uk-R5 for 33893-done@debbugs.gnu.org; Thu, 10 Jan 2019 08:15:50 -0500 Received: from localhost (77.116.226.247.wireless.dyn.drei.com [77.116.226.247]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 5567A3360312; Thu, 10 Jan 2019 14:15:48 +0100 (CET) Date: Thu, 10 Jan 2019 14:15:42 +0100 From: Danny Milosavljevic Message-ID: <20190110141542.715a0274@scratchpost.org> In-Reply-To: <87k1jcew0m.fsf@gnu.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> <20190107194455.69823f82@scratchpost.org> <87va2z1qxl.fsf@gnu.org> <20190110032210.1242af1f@scratchpost.org> <87k1jcew0m.fsf@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/_O0BSOIACqNHFGDwpAytbg9"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --Sig_/_O0BSOIACqNHFGDwpAytbg9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Thu, 10 Jan 2019 09:50:49 +0100 Ludovic Court=C3=A8s wrote: > Howdy! >=20 > Danny Milosavljevic skribis: >=20 > > On Tue, 08 Jan 2019 09:42:14 +0100 > > Ludovic Court=C3=A8s wrote: > > =20 > >> > Go has peculiar ideas of how the directory layout is supposed to be = set up. > >> > I could probably figure it out - but if someone with more Go knowled= ge could > >> > step forward it would be much faster. =20 > >>=20 > >> I see Leo is Cc=E2=80=99d so we=E2=80=99ll see. :-) =20 > > > > Nevermind, I've fixed it and learned something in the process: > > > > Linux doesn't actually know the current working directory as a string. > > It only knows the inode, so if you call getcwd, what libc actually does= is > > it opendirs "..", then finds the entry with the same inode number as > > the current directory, and then returns the name of that entry. =20 According to the POSIX standard ;) > Are you sure? In the Linux port of glibc I see this: >=20 > --8<---------------cut here---------------start------------->8--- > char * > __getcwd (char *buf, size_t size) > { > char *path; > char *result; >=20 > // [=E2=80=A6] >=20 > retval =3D INLINE_SYSCALL (getcwd, 2, path, alloc_size); > --8<---------------cut here---------------end--------------->8--- >=20 > And indeed, there=E2=80=99s a =E2=80=98getcwd=E2=80=99 syscall: >=20 > --8<---------------cut here---------------start------------->8--- > $ strace -e getcwd guile -c '(getcwd)' > getcwd("/home/ludo", 100) =3D 11 > +++ exited with 0 +++ > --8<---------------cut here---------------end--------------->8--- Huh. I guess it boils down to whether the Linux "process" structure has the cwd in it as a string or as an inode. In Linux sources: static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) { spin_lock(&fs->lock); *pwd =3D fs->pwd; path_get(pwd); spin_unlock(&fs->lock); } static void get_fs_root_and_pwd_rcu(struct fs_struct *fs, struct path *root, struct path *pwd) { unsigned seq; do { seq =3D read_seqcount_begin(&fs->seq); *root =3D fs->root; *pwd =3D fs->pwd; } while (read_seqcount_retry(&fs->seq, seq)); } struct path { struct vfsmount *mnt; struct dentry *dentry; } __randomize_layout; SYSCALL_DEFINE2(getcwd, char __user *, buf, unsigned long, size) { int error; struct path pwd, root; char *page =3D __getname(); if (!page) return -ENOMEM; rcu_read_lock(); get_fs_root_and_pwd_rcu(current->fs, &root, &pwd); error =3D -ENOENT; if (!d_unlinked(pwd.dentry)) { unsigned long len; char *cwd =3D page + PATH_MAX; int buflen =3D PATH_MAX; prepend(&cwd, &buflen, "\0", 1); error =3D prepend_path(&pwd, &root, &cwd, &buflen); rcu_read_unlock(); if (error < 0) goto out; /* Unreachable from current root */ if (error > 0) { error =3D prepend_unreachable(&cwd, &buflen); if (error) goto out; } error =3D -ERANGE; len =3D PATH_MAX + page - cwd; if (len <=3D size) { error =3D len; if (copy_to_user(buf, cwd, len)) error =3D -EFAULT; } } else { rcu_read_unlock(); } out: __putname(page); return error; } /* * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values. * It can block. */ void set_fs_pwd(struct fs_struct *fs, const struct path *path) { struct path old_pwd; path_get(path); spin_lock(&fs->lock); write_seqcount_begin(&fs->seq); old_pwd =3D fs->pwd; fs->pwd =3D *path; <----------------- !!!! write_seqcount_end(&fs->seq); spin_unlock(&fs->lock); if (old_pwd.dentry) path_put(&old_pwd); } int ksys_chdir(const char __user *filename) { struct path path; int error; unsigned int lookup_flags =3D LOOKUP_FOLLOW | LOOKUP_DIRECTORY; retry: error =3D user_path_at(AT_FDCWD, filename, lookup_flags, &path); if (error) goto out; error =3D inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHD= IR); if (error) goto dput_and_out; set_fs_pwd(current->fs, &path); <----------------- !!! dput_and_out: path_put(&path); if (retry_estale(error, lookup_flags)) { lookup_flags |=3D LOOKUP_REVAL; goto retry; } out: return error; } SYSCALL_DEFINE1(chdir, const char __user *, filename) { return ksys_chdir(filename); } SYSCALL_DEFINE1(fchdir, unsigned int, fd) { struct fd f =3D fdget_raw(fd); int error; error =3D -EBADF; if (!f.file) goto out; error =3D -ENOTDIR; if (!d_can_lookup(f.file->f_path.dentry)) goto out_putf; error =3D inode_permission(file_inode(f.file), MAY_EXEC | MAY_CHDIR= ); if (!error) set_fs_pwd(current->fs, &f.file->f_path); out_putf: fdput(f); out: return error; } Interesting! > Thanks for taking the time to address this! No problem :) --Sig_/_O0BSOIACqNHFGDwpAytbg9 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlw3RX4ACgkQ5xo1VCww uqW/Ngf8DrCj8kxRvkwVUpBmjoO+ywau0iykiwWhAHuQEcxyD/Rg1QYaw662in/p r0GCzjKCtxaaFrK7JmDbuwm2/5d7yaI8ABqj95Os+y+IrN47rysSuTa3LmdcbzCt YJKMoOD87vKEh3yLTvIfHOiQekTWUY+Fgac9W6ZRGCoKwN+Lz9TGPkcmNIGPrYA5 gOFX46Flka0SjPK7REbfguViR2ZLO6i8vyK/w2s4Pll+WShn15iWVzaHOr1PWDo6 o7yrMnqebXnFXdYGGghULHlvz54fRnetEN+pJZUfmenjV3VYyPS/cxpZnXfUNPKE 28B0D94VvFS4ZHjP6Pu0hD0avAHygw== =SUVE -----END PGP SIGNATURE----- --Sig_/_O0BSOIACqNHFGDwpAytbg9-- From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Jan 2019 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.1547152276431 (code B ref 33893); Thu, 10 Jan 2019 20:32:02 +0000 Received: (at 33893) by debbugs.gnu.org; 10 Jan 2019 20:31:16 +0000 Received: from localhost ([127.0.0.1]:54296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghgyx-00006t-Jn for submit@debbugs.gnu.org; Thu, 10 Jan 2019 15:31:15 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghgyw-00006e-B9 for 33893@debbugs.gnu.org; Thu, 10 Jan 2019 15:31:14 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 233FD20C9A; Thu, 10 Jan 2019 15:31:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 10 Jan 2019 15:31:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=mcjVvAXBT5Sy/9qwba0Lby7U M2kC8EDGEOFfr9CpOnw=; b=TMQozsMpVqZhejLzStu/dlmJBwha7baS6kVlJDNi pJOza8T7bemN/lcz0aOwIR6U2eduxbFivlfOB3t7Jm8c8SudFmYvVxojrpS1xuKU 4ILE9qs755dpIInx4+lgQgPDQyckzmPs6SWEO7j23hmiFYm0bjOAQUEj03tcOU6w IY8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mcjVvA XBT5Sy/9qwba0Lby7UM2kC8EDGEOFfr9CpOnw=; b=dOXhcf3mU76UlA67zc9VHj R9TsBqPNT2tELkSltlZ0gsUEqOn1NDXnk77ffX7cNFH4mRFUbZdiUuNdGA+fILwh Srh6w2G7tvxWvDkpXst468Y6Un996FS7UsjItxz+PHn9hL9p/7KrbwlVFIWWOTIP 2/M9hHOelWKUIJ2IEb7GcETHMF+VoMHQJP7gqLdYnLCyxsJ/cMXlNvF3tLPnwdmy 1ssXNWhW2OmKkgr8Ss67Ad1YmAMERvrdLA9WHUdwdHMEf6uGtCEDYiBcpsDw6djM UAEd7/bv0/34J8if8l3we64ZRNG4Dv4HSL6E66l6K6137vWYHamAo5+84dEKaUZg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrfeefgddugedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkfh ggtggujggfsehgtderredtreejnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehl vghosehfrghmuhhlrghrihdrnhgrmhgvqeenucfkphepjeeirdduvdegrddvtddvrddufe ejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv necuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (c-76-124-202-137.hsd1.pa.comcast.net [76.124.202.137]) by mail.messagingengine.com (Postfix) with ESMTPA id E4283100B8; Thu, 10 Jan 2019 15:31:07 -0500 (EST) Date: Thu, 10 Jan 2019 15:31:07 -0500 From: Leo Famulari Message-ID: <20190110203107.GC14234@jasmine.lan> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> <20190107194455.69823f82@scratchpost.org> <87va2z1qxl.fsf@gnu.org> <20190110032210.1242af1f@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="96YOpH+ONegL0A3E" Content-Disposition: inline In-Reply-To: <20190110032210.1242af1f@scratchpost.org> User-Agent: Mutt/1.11.0 (2018-11-25) X-Spam-Score: -0.7 (/) 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: -1.7 (-) --96YOpH+ONegL0A3E Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 10, 2019 at 03:22:10AM +0100, Danny Milosavljevic wrote: > Hi Ludo, > Hi Leo, >=20 > On Tue, 08 Jan 2019 09:42:14 +0100 > Ludovic Court=C3=A8s wrote: >=20 > > > Go has peculiar ideas of how the directory layout is supposed to be s= et up. > > > I could probably figure it out - but if someone with more Go knowledg= e could > > > step forward it would be much faster. =20 > >=20 > > I see Leo is Cc=E2=80=99d so we=E2=80=99ll see. :-) Indeed, Go is very particular about this... > Nevermind, I've fixed it and learned something in the process: Okay, good :) Let me know if you have more Go questions. --96YOpH+ONegL0A3E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlw3q4oACgkQJkb6MLrK fwjkrhAA2KCK5RfxEfqHVXmGS/ux42HqzAqTALSIL16j7T77zq71vnufpipyQheK yJ0RltAbmIAUkK7e7vNqNWqypZvbNZtvUsqXIIVM/cYp9oPU9mdPV+uJqGEn8oqm 4I8cz1ac6wXefYqmre2UIAulBKPAEPefG6JdZHHDhtW5hqpocaPXIp8u+Fy4jI9R z/1l3oGn2co8odWGlwuMAmjTn2IvNUwp/aPQ5zXB++IXxwdofQnhYwZaGXeqpUaS zafsbnNxCU+Dk9iTNH6xXMaHUuui8gucY+iIj6mK5GmkcmDfNRrchIrbP+QYspyo fzVTAuXiRuxcyO/4shpnJS9KKZzgXxOqmXj4mw7DlEfELxQA7TF0XkJfGP7eynH3 fQahJkn5XhJm2mAUKO7v3DVI/DY/sNdYEw8h/41VgKmz4MPBX45wDzAKz9nsLrLf Z/Krz1Ox9uUmpudWajVdPQephw0Q+vyarv6+3g41TWx85oge0BPQj0d4ikiABCb7 BwCXC90NU9U2GdfFYMBU8zlE1gnboDoHezcEvFdr387ZMI95CPWeqFMGWJbtRIju eycKksDNt0687yAqHugzAVZYPUo6Qq4ClV+LlmlmL+UXR7PBpdtdyCivHvO3e0Jc xODNE+YsdQVg2t8JFC5ombz5bQhFHJvZkGwYKR4OAZmXkbmoxhQ= =AIAR -----END PGP SIGNATURE----- --96YOpH+ONegL0A3E-- From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 4/4] gnu: Add docker-cli. Resent-From: Meiyo Peng Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Jan 2019 03:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 33893@debbugs.gnu.org Received: via spool by 33893-submit@debbugs.gnu.org id=B33893.154743604029048 (code B ref 33893); Mon, 14 Jan 2019 03:21:01 +0000 Received: (at 33893) by debbugs.gnu.org; 14 Jan 2019 03:20:40 +0000 Received: from localhost ([127.0.0.1]:58228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gisnn-0007YQ-Ih for submit@debbugs.gnu.org; Sun, 13 Jan 2019 22:20:39 -0500 Received: from mail-pf1-f181.google.com ([209.85.210.181]:42782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gisnl-0007YA-AP for 33893@debbugs.gnu.org; Sun, 13 Jan 2019 22:20:37 -0500 Received: by mail-pf1-f181.google.com with SMTP id 64so9654062pfr.9 for <33893@debbugs.gnu.org>; Sun, 13 Jan 2019 19:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=JwGyIqIZiufs+VZGxqb85mBaUwPmEVcVJDD79Rl0xyM=; b=vApu+fWmSextdZstoE1MY980SjKDhFQWRugqz7TD6Kbmj7UPVd5s8I3Lr1YJsiIPwY WeRNQHLt5+DyXUZmRMq2iickXqPgGXMoHqCu7T/I7MGl6q42ZJnzsSDr61Kua0pRb0vU CL9Wu9EoTHqXmokCBWdGyouMH68FODnTxPGoQ8YX4V24Fib4eFPu2ivwODM0/3RLs8fM rB3SjQXlN9OYeOXORwIeUQFa/Uw+iDBSrnPHM4j/FdzoR0DYXEvz7v498NxZyIIPNLIJ oGoRLhRnv1dpr85LCRc4t/GIektO3Az/1MaJLP8FvPLvPwWvZww1zzEmXXHEu5GohA/e NE9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=JwGyIqIZiufs+VZGxqb85mBaUwPmEVcVJDD79Rl0xyM=; b=QZASg1ApYHeIRS+OeCOt6koRP4DUFd6n8CWmFBgCfx3VgFgChe+GCcH2VU7geLO0fx 1LHTQDszTJ8mX4IZreT9l0uIi+n1lv9iQQUY3WIozgjmHZ/mjKSbCFFBlUQHuzvfZQlG 0JfxkPO7ba6UD0CVZDTF13aYTnIArBUTRP12t8fOumtGiJ2wmY14dxR8y+z90cLXhMQh xV9i0d3MJDN4IsI/IKH07uSFTbu2KP8pd9ESjFfZ025YOJSecoIQtMH/OEXtWTKAXWk6 C2aJnw6i1h/Ppq+G1ltpg5EyJ3RfCFmufbnBJp87/MJIfcZ/4FePjaUMaNhvSmbes55w pdvQ== X-Gm-Message-State: AJcUukfCm6pe0l9p6MNKYJJ4D3s6zatw/7ZBuQn9HoaxJY7ul0PVnPZ9 X3Dd3FZ++TEiZq/6NNc8CbzPu/SRPRM= X-Google-Smtp-Source: ALg8bN65k8Hfa+lkyEgVAq7rBHjRi6v+Ikc4z9uA3QYRovLfseJWalnbdYjnRKP/DT0bVwVT0AH4cQ== X-Received: by 2002:a62:11c7:: with SMTP id 68mr23571183pfr.21.1547436030412; Sun, 13 Jan 2019 19:20:30 -0800 (PST) Received: from dinosaur (144.34.217.65.16clouds.com. [144.34.217.65]) by smtp.gmail.com with ESMTPSA id n22sm172298544pfh.166.2019.01.13.19.20.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Jan 2019 19:20:29 -0800 (PST) References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-5-dannym@scratchpost.org> <87bm4ty19z.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Meiyo Peng In-reply-to: <87bm4ty19z.fsf@gnu.org> Date: Mon, 14 Jan 2019 11:20:24 +0800 Message-ID: <87tvicylfr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: -1.0 (-) Hi Danny, docker-cli provides two identical commands in "/gnu/store/*docker-cli*/bin/". #+begin_SRC sh ~ ll /gnu/store/*docker-cli*/bin/* -r-xr-xr-x 3 root root 64M Jan 1 1970 /gnu/store/hr7h12q3gvs98pr832b66479cp8wlzhk-docker-cli-18.09.0/bin/docker* -r-xr-xr-x 3 root root 64M Jan 1 1970 /gnu/store/hr7h12q3gvs98pr832b66479cp8wlzhk-docker-cli-18.09.0/bin/docker-linux-amd64* ~ sha256sum /gnu/store/*docker-cli*/bin/* 62bc8199fd11f37129d6e8183865df698f495faf90a86bdbe5ee4891b201cbc8 /gnu/store/hr7h12q3gvs98pr832b66479cp8wlzhk-docker-cli-18.09.0/bin/docker 62bc8199fd11f37129d6e8183865df698f495faf90a86bdbe5ee4891b201cbc8 /gnu/store/hr7h12q3gvs98pr832b66479cp8wlzhk-docker-cli-18.09.0/bin/docker-linux-amd64 #+end_SRC It wastes 64MB disk space. Can we remove "docker-linux-amd64"? -- Meiyo Peng https://www.pengmeiyu.com/ From unknown Fri Jun 13 06:14:00 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33893] [PATCH v5 4/4] gnu: Add docker-cli. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Jan 2019 12:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Meiyo Peng Cc: 33893-done@debbugs.gnu.org Received: via spool by 33893-done@debbugs.gnu.org id=D33893.15475556785092 (code D ref 33893); Tue, 15 Jan 2019 12:35:02 +0000 Received: (at 33893-done) by debbugs.gnu.org; 15 Jan 2019 12:34:38 +0000 Received: from localhost ([127.0.0.1]:59598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjNvR-0001K4-Oi for submit@debbugs.gnu.org; Tue, 15 Jan 2019 07:34:37 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:55626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjNvP-0001Jv-In for 33893-done@debbugs.gnu.org; Tue, 15 Jan 2019 07:34:36 -0500 Received: from localhost (77.116.158.150.wireless.dyn.drei.com [77.116.158.150]) by dd26836.kasserver.com (Postfix) with ESMTPSA id DD6BB3360B72; Tue, 15 Jan 2019 13:34:33 +0100 (CET) Date: Tue, 15 Jan 2019 13:34:31 +0100 From: Danny Milosavljevic Message-ID: <20190115133431.7fdcf512@scratchpost.org> In-Reply-To: <87tvicylfr.fsf@gmail.com> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-5-dannym@scratchpost.org> <87bm4ty19z.fsf@gnu.org> <87tvicylfr.fsf@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/UEr/kdvSC0hbXJVD9/R1__a"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --Sig_/UEr/kdvSC0hbXJVD9/R1__a Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, > It wastes 64MB disk space. Can we remove "docker-linux-amd64"? Done in commit f3705090965c2470a0ccc2c045edbc5f5fb7bb8d. Thanks! --Sig_/UEr/kdvSC0hbXJVD9/R1__a Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlw901cACgkQ5xo1VCww uqXrnQf/e9X78rzEdzhUlALgQf8yniKAKq38SPf4f1jPZq5JKJ4mgeNXxAHhoSMQ YOoGw8TNVIzwfPvn324Dt70Xp3NuBIh1LOVazcXuGkGQF+ksik+/BOvq/oYOj7jf 69kYTot596pUoYQFRZddURWFSparFgATQ3C7wD043EX9Jx2GWeVrNprt1KQR1lng ocdNLXHGfmag/r19G4P4VZKJyxNNH5XKaClOERt+FTVIPF5QZNtfdgxe6UkJdjry qBRIJMxkKTk25T6aaCzpzt/Qm4G9+Ez3ZdIv7HSlPSzrQm50Iy2IdyioNdyiUAa6 vTcC00ZzoiwzMutngbwLdDwkUP2Keg== =z1/Z -----END PGP SIGNATURE----- --Sig_/UEr/kdvSC0hbXJVD9/R1__a--