1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
3 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
6 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
7 ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
8 ;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com>
9 ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages docker)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (gnu packages)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system go)
35 #:use-module (guix build-system python)
36 #:use-module (guix utils)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages golang)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages networking)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages python-crypto)
48 #:use-module (gnu packages python-web)
49 #:use-module (gnu packages python-xyz)
50 #:use-module (gnu packages version-control)
51 #:use-module (gnu packages virtualization))
53 ;; Note - when changing Docker versions it is important to update the versions
54 ;; of several associated packages (docker-libnetwork and go-sctp).
55 (define %docker-version "19.03.15")
57 (define-public python-docker
59 (name "python-docker")
64 (uri (pypi-uri "docker" version))
67 "0qmrcvpaz37p85hfddsd4yc8hgqlkzs4cz09q9wmy0pz5pwajqm0"))))
68 (build-system python-build-system)
69 ;; TODO: Tests require a running Docker daemon.
70 (arguments '(#:tests? #f))
72 `(("python-requests" ,python-requests-2.20)
73 ("python-six" ,python-six)
74 ("python-urllib3" ,python-urllib3-1.24)))
76 `(("python-docker-pycreds" ,python-docker-pycreds)
77 ("python-paramiko" ,python-paramiko) ;adds SSH support
78 ("python-websocket-client" ,python-websocket-client)))
79 (home-page "https://github.com/docker/docker-py/")
80 (synopsis "Python client for Docker")
81 (description "Docker-Py is a Python client for the Docker container
83 (license license:asl2.0)))
85 (define-public python-dockerpty
87 (name "python-dockerpty")
92 (uri (pypi-uri "dockerpty" version))
95 "1kjn64wx23jmr8dcc6g7bwlmrhfmxr77gh6iphqsl39sayfxdab9"))))
96 (build-system python-build-system)
98 `(("python-six" ,python-six)))
99 (home-page "https://github.com/d11wtq/dockerpty")
100 (synopsis "Python library to use the pseudo-TTY of a Docker container")
101 (description "Docker PTY provides the functionality needed to operate the
102 pseudo-terminal (PTY) allocated to a Docker container using the Python
104 (license license:asl2.0)))
106 (define-public docker-compose
108 (name "docker-compose")
113 (uri (pypi-uri "docker-compose" version))
116 "1ww8ckpj3n5jdg63qvmiqx3gk0fsrnynnnqj17fppymbwjzf5fps"))))
117 (build-system python-build-system)
118 ;; TODO: Tests require running Docker daemon.
119 (arguments '(#:tests? #f))
121 `(("python-cached-property"
122 ,python-cached-property)
123 ("python-docker" ,python-docker)
124 ("python-dockerpty" ,python-dockerpty)
125 ("python-docopt" ,python-docopt)
126 ("python-jsonschema" ,python-jsonschema)
127 ("python-pyyaml" ,python-pyyaml)
128 ("python-requests" ,python-requests)
129 ("python-six" ,python-six)
130 ("python-texttable" ,python-texttable)
131 ("python-websocket-client" ,python-websocket-client)))
132 (home-page "https://www.docker.com/")
133 (synopsis "Multi-container orchestration for Docker")
134 (description "Docker Compose is a tool for defining and running
135 multi-container Docker applications. A Compose file is used to configure an
136 application’s services. Then, using a single command, the containers are
137 created and all the services are started as specified in the configuration.")
138 (license license:asl2.0)))
140 (define-public python-docker-pycreds
142 (name "python-docker-pycreds")
147 (uri (pypi-uri "docker-pycreds" version))
150 "1m44smrggnqghxkqfl7vhapdw89m1p3vdr177r6cq17lr85jgqvc"))))
151 (build-system python-build-system)
154 (modify-phases %standard-phases
155 (add-after 'unpack 'fix-versioning
157 (substitute* "test-requirements.txt"
158 (("3.0.2") ,(package-version python-pytest))
159 (("2.3.1") ,(package-version python-pytest-cov))
160 (("2.4.1") ,(package-version python-flake8)))
163 `(("python-flake8" ,python-flake8)
164 ("python-pytest" ,python-pytest)
165 ("python-pytest-cov" ,python-pytest-cov)))
167 `(("python-six" ,python-six)))
168 (home-page "https://github.com/shin-/dockerpy-creds")
170 "Python bindings for the Docker credentials store API")
172 "Docker-Pycreds contains the Python bindings for the docker credentials
173 store API. It allows programmers to interact with a Docker registry using
174 Python without keeping their credentials in a Docker configuration file.")
175 (license license:asl2.0)))
177 (define-public containerd
185 (url "https://github.com/containerd/containerd")
186 (commit (string-append "v" version))))
187 (file-name (git-file-name name version))
189 (base32 "0qjbfj1dw6pykxhh8zahcxlgpyjzgnrngk5vjaf34akwyan8nrxb"))))
190 (build-system go-build-system)
192 (let ((make-flags (list (string-append "VERSION=" version)
194 `(#:import-path "github.com/containerd/containerd"
196 (modify-phases %standard-phases
197 (add-after 'chdir 'patch-paths
198 (lambda* (#:key inputs import-path outputs #:allow-other-keys)
199 (with-directory-excursion (string-append "src/" import-path)
200 (substitute* "runtime/v1/linux/runtime.go"
201 (("defaultRuntime[ \t]*=.*")
202 (string-append "defaultRuntime = \""
203 (assoc-ref inputs "runc")
205 (("defaultShim[ \t]*=.*")
206 (string-append "defaultShim = \""
207 (assoc-ref outputs "out")
208 "/bin/containerd-shim\"\n")))
209 (substitute* "vendor/github.com/containerd/go-runc/runc.go"
210 (("DefaultCommand[ \t]*=.*")
211 (string-append "DefaultCommand = \""
212 (assoc-ref inputs "runc")
214 (substitute* "vendor/github.com/containerd/continuity/testutil\
215 /loopback/loopback_linux.go"
216 (("exec\\.Command\\(\"losetup\"")
217 (string-append "exec.Command(\""
218 (assoc-ref inputs "util-linux")
220 (substitute* "archive/compression/compression.go"
221 (("exec\\.LookPath\\(\"unpigz\"\\)")
222 (string-append "\"" (assoc-ref inputs "pigz")
223 "/bin/unpigz\", error(nil)"))))))
225 (lambda* (#:key import-path #:allow-other-keys)
226 (with-directory-excursion (string-append "src/" import-path)
227 (apply invoke "make" ',make-flags))))
229 (lambda* (#:key import-path outputs #:allow-other-keys)
230 (with-directory-excursion (string-append "src/" import-path)
231 (let* ((out (assoc-ref outputs "out")))
232 (apply invoke "make" (string-append "DESTDIR=" out) "install"
233 ',make-flags)))))))))
235 `(("btrfs-progs" ,btrfs-progs)
236 ("libseccomp" ,libseccomp)
239 ("util-linux" ,util-linux)))
242 ("pkg-config" ,pkg-config)))
243 (synopsis "Docker container runtime")
244 (description "This package provides the container daemon for Docker.
245 It includes image transfer and storage, container execution and supervision,
246 network attachments.")
247 (home-page "https://containerd.io/")
248 (license license:asl2.0)))
250 ;;; Private package that shouldn't be used directly; its purposes is to be
251 ;;; used as a template for the various packages it contains. It doesn't build
252 ;;; anyway, as it needs many dependencies that aren't being satisfied.
253 (define docker-libnetwork
254 ;; There are no recent release for libnetwork, so choose the last commit of
255 ;; the branch that Docker uses, as can be seen in the Docker source file
256 ;; 'hack/dockerfile/install/proxy.installer'. NOTE - It is important that
257 ;; this version is kept in sync with the version of Docker being used.
258 ;; This commit is the "bump_19.03" branch, as mentioned in Docker's vendor.conf.
259 (let ((commit "55e924b8a84231a065879156c0de95aefc5f5435")
260 (version (version-major+minor %docker-version))
263 (name "docker-libnetwork")
264 (version (git-version version revision commit))
268 ;; Redirected from github.com/docker/libnetwork.
269 (url "https://github.com/moby/libnetwork")
271 (file-name (git-file-name name version))
274 "19syb3scwiykn44gqfaqrgqv8a0df4ps0ykf3za9xkjc5cyi99mp"))
275 ;; Delete bundled ("vendored") free software source code.
276 (modules '((guix build utils)))
278 (delete-file-recursively "vendor")
280 (build-system go-build-system)
282 `(#:import-path "github.com/moby/libnetwork/"))
283 (home-page "https://github.com/moby/libnetwork/")
284 (synopsis "Networking for containers")
285 (description "Libnetwork provides a native Go implementation for
286 connecting containers. The goal of @code{libnetwork} is to deliver a robust
287 container network model that provides a consistent programming interface and
288 the required network abstractions for applications.")
289 (license license:asl2.0))))
291 (define-public docker-libnetwork-cmd-proxy
293 (inherit docker-libnetwork)
294 (name "docker-libnetwork-cmd-proxy")
296 `(#:import-path "github.com/docker/libnetwork/cmd/proxy"
297 #:unpack-path "github.com/docker/libnetwork"
298 #:install-source? #f))
300 `(("go-sctp" ,go-sctp)
302 ("logrus" ,go-github-com-sirupsen-logrus)
303 ("go-netlink" ,go-netlink)
304 ("go-netns" ,go-netns)
305 ("go-golang-org-x-crypto"
306 ,go-golang-org-x-crypto)
307 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
308 (synopsis "Docker user-space proxy")
309 (description "A proxy running in the user space. It is used by the
310 built-in registry server of Docker.")
311 (license license:asl2.0)))
313 ;; TODO: Patch out modprobes for ip_vs, nf_conntrack,
314 ;; brige, nf_conntrack_netlink, aufs.
315 (define-public docker
318 (version %docker-version)
323 (url "https://github.com/moby/moby")
324 (commit (string-append "v" version))))
325 (file-name (git-file-name name version))
327 (base32 "0419iha9zmwlhzhnbfxlsa13vgd04yifnsr8qqnj2ks5dxrcajl8"))
329 (search-patches "docker-fix-tests.patch"))))
330 (build-system gnu-build-system)
333 ((guix build gnu-build-system)
334 ((guix build go-build-system) #:prefix go:)
338 (,@%gnu-build-system-modules
340 (guix build go-build-system))
342 (modify-phases %standard-phases
343 (add-after 'unpack 'patch-paths
344 (lambda* (#:key inputs #:allow-other-keys)
345 (substitute* "builder/builder-next/executor_unix.go"
346 (("CommandCandidates:.*runc.*")
347 (string-append "CommandCandidates: []string{\""
348 (assoc-ref inputs "runc")
349 "/sbin/runc\"},\n")))
350 (substitute* "vendor/github.com/containerd/go-runc/runc.go"
351 (("DefaultCommand = .*")
352 (string-append "DefaultCommand = \""
353 (assoc-ref inputs "runc")
355 (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go"
356 (("defaultRuntime[ \t]*=.*")
357 (string-append "defaultRuntime = \""
358 (assoc-ref inputs "runc")
360 (("defaultShim[ \t]*=.*")
361 (string-append "defaultShim = \""
362 (assoc-ref inputs "containerd")
363 "/bin/containerd-shim\"\n")))
364 (substitute* "daemon/daemon_unix.go"
365 (("DefaultShimBinary = .*")
366 (string-append "DefaultShimBinary = \""
367 (assoc-ref inputs "containerd")
368 "/bin/containerd-shim\"\n"))
369 (("DefaultRuntimeBinary = .*")
370 (string-append "DefaultRuntimeBinary = \""
371 (assoc-ref inputs "runc")
373 (("DefaultRuntimeName = .*")
374 (string-append "DefaultRuntimeName = \""
375 (assoc-ref inputs "runc")
377 (substitute* "daemon/config/config.go"
378 (("StockRuntimeName = .*")
379 (string-append "StockRuntimeName = \""
380 (assoc-ref inputs "runc")
382 (("DefaultInitBinary = .*")
383 (string-append "DefaultInitBinary = \""
384 (assoc-ref inputs "tini")
386 (substitute* "daemon/config/config_common_unix_test.go"
387 (("expectedInitPath: \"docker-init\"")
388 (string-append "expectedInitPath: \""
389 (assoc-ref inputs "tini")
391 (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go"
392 (("var defaultCommandCandidates = .*")
393 (string-append "var defaultCommandCandidates = []string{\""
394 (assoc-ref inputs "runc") "/sbin/runc\"}")))
395 (substitute* "vendor/github.com/docker/libnetwork/portmapper/proxy.go"
396 (("var userlandProxyCommandName = .*")
397 (string-append "var userlandProxyCommandName = \""
398 (assoc-ref inputs "docker-proxy")
400 (substitute* "pkg/archive/archive.go"
402 (string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz")))
403 ;; TODO: Remove when Docker proper uses v1.14.x to build
404 (substitute* "registry/resumable/resumablerequestreader_test.go"
405 (("I%27m%20not%20an%20url" all)
406 (string-append "\"" all "\"")))
407 ;; TODO: Remove when Docker proper uses v1.14.x to build
408 (substitute* "vendor/gotest.tools/x/subtest/context.go"
409 (("func \\(tc \\*testcase\\) Cleanup\\(" all)
410 (string-append all "func()"))
411 (("tc\\.Cleanup\\(" all)
412 (string-append all "nil")))
414 (let ((source-files (filter (lambda (name)
415 (not (string-contains name "test")))
416 (find-files "." "\\.go$"))))
417 (let-syntax ((substitute-LookPath*
419 ((_ (source-text package relative-path) ...)
420 (substitute* source-files
421 (((string-append "\\<exec\\.LookPath\\(\""
425 (assoc-ref inputs package)
427 "\", error(nil)")) ...))))
430 ((_ (source-text package relative-path) ...)
431 (substitute* source-files
432 (((string-append "\\<(re)?exec\\.Command\\(\""
435 (string-append (if re? re? "")
437 (assoc-ref inputs package)
440 (substitute-LookPath*
441 ("containerd" "containerd" "bin/containerd")
442 ("ps" "procps" "bin/ps")
443 ("mkfs.xfs" "xfsprogs" "bin/mkfs.xfs")
444 ("lvmdiskscan" "lvm2" "sbin/lvmdiskscan")
445 ("pvdisplay" "lvm2" "sbin/pvdisplay")
446 ("blkid" "util-linux" "sbin/blkid")
447 ("unpigz" "pigz" "bin/unpigz")
448 ("iptables" "iptables" "sbin/iptables")
449 ("iptables-legacy" "iptables" "sbin/iptables")
450 ("ip" "iproute2" "sbin/ip"))
453 ("modprobe" "kmod" "bin/modprobe")
454 ("pvcreate" "lvm2" "sbin/pvcreate")
455 ("vgcreate" "lvm2" "sbin/vgcreate")
456 ("lvcreate" "lvm2" "sbin/lvcreate")
457 ("lvconvert" "lvm2" "sbin/lvconvert")
458 ("lvchange" "lvm2" "sbin/lvchange")
459 ("mkfs.xfs" "xfsprogs" "sbin/mkfs.xfs")
460 ("xfs_growfs" "xfsprogs" "sbin/xfs_growfs")
461 ("mkfs.ext4" "e2fsprogs" "sbin/mkfs.ext4")
462 ("tune2fs" "e2fsprogs" "sbin/tune2fs")
463 ("blkid" "util-linux" "sbin/blkid")
464 ("resize2fs" "e2fsprogs" "sbin/resize2fs")
465 ("ps" "procps" "bin/ps")
466 ("losetup" "util-linux" "sbin/losetup")
467 ("uname" "coreutils" "bin/uname")
468 ("dbus-launch" "dbus" "bin/dbus-launch")
469 ("git" "git" "bin/git")))
470 ;; docker-mountfrom ??
473 ;; docker-applyLayer ??
478 ;; Make compilation fail when, in future versions, Docker
479 ;; invokes other programs we don't know about and thus don't
481 (substitute* source-files
482 ;; Search for Java in PATH.
483 (("\\<exec\\.Command\\(\"java\"")
484 "xxec.Command(\"java\"")
485 ;; Search for AUFS in PATH (mainline Linux doesn't support it).
486 (("\\<exec\\.Command\\(\"auplink\"")
487 "xxec.Command(\"auplink\"")
488 ;; Fail on other unsubstituted commands.
489 (("\\<exec\\.Command\\(\"([a-zA-Z0-9][a-zA-Z0-9_-]*)\""
491 (string-append "exec.Guix_doesnt_want_Command(\""
493 (("\\<xxec\\.Command")
495 ;; Search for ZFS in PATH.
496 (("\\<LookPath\\(\"zfs\"\\)") "LooxPath(\"zfs\")")
497 ;; Fail on other unsubstituted LookPaths.
498 (("\\<LookPath\\(\"") "Guix_doesnt_want_LookPath\\(\"")
499 (("\\<LooxPath") "LookPath")))
501 (add-after 'patch-paths 'delete-failing-tests
503 ;; Needs internet access.
504 (delete-file "builder/remotecontext/git/gitutils_test.go")
505 ;; Permission denied.
506 (delete-file "daemon/graphdriver/devmapper/devmapper_test.go")
507 ;; Operation not permitted (idtools.MkdirAllAndChown).
508 (delete-file "daemon/graphdriver/vfs/vfs_test.go")
509 ;; Timeouts after 5 min.
510 (delete-file "plugin/manager_linux_test.go")
511 ;; Operation not permitted.
512 (delete-file "daemon/graphdriver/aufs/aufs_test.go")
513 (delete-file "daemon/graphdriver/btrfs/btrfs_test.go")
514 (delete-file "daemon/graphdriver/overlay/overlay_test.go")
515 (delete-file "daemon/graphdriver/overlay2/overlay_test.go")
516 (delete-file "pkg/chrootarchive/archive_unix_test.go")
517 (delete-file "daemon/container_unix_test.go")
518 ;; This file uses cgroups and /proc.
519 (delete-file "pkg/sysinfo/sysinfo_linux_test.go")
520 ;; This file uses cgroups.
521 (delete-file "runconfig/config_test.go")
522 ;; This file uses /var.
523 (delete-file "daemon/oci_linux_test.go")
524 ;; Signal tests fail in bizarre ways
525 (delete-file "pkg/signal/signal_linux_test.go")
529 (setenv "DOCKER_BUILDTAGS" "seccomp")
530 (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version))
531 (setenv "VERSION" (string-append ,%docker-version "-ce"))
532 ;; Automatically use bundled dependencies.
533 ;; TODO: Unbundle - see file "vendor.conf".
534 (setenv "AUTO_GOPATH" "1")
535 ;; Respectively, strip the symbol table and debug
536 ;; information, and the DWARF symbol table.
537 (setenv "LDFLAGS" "-s -w")
539 (setenv "GOCACHE" "/tmp")
541 (add-before 'build 'setup-go-environment
542 (assoc-ref go:%standard-phases 'setup-go-environment))
545 ;; Our LD doesn't like the statically linked relocatable things
546 ;; that go produces, so install the dynamic version of
548 (invoke "hack/make.sh" "dynbinary")))
551 ;; The build process generated a file because the environment
552 ;; variable "AUTO_GOPATH" was set. Use it.
553 (setenv "GOPATH" (string-append (getcwd) "/.gopath"))
554 ;; ".gopath/src/github.com/docker/docker" is a link to the current
555 ;; directory and chdir would canonicalize to that.
556 ;; But go needs to have the uncanonicalized directory name, so
558 (setenv "PWD" (string-append (getcwd)
559 "/.gopath/src/github.com/docker/docker"))
560 (with-directory-excursion ".gopath/src/github.com/docker/docker"
561 (invoke "hack/test/unit"))
565 (lambda* (#:key outputs #:allow-other-keys)
566 (let* ((out (assoc-ref outputs "out"))
567 (out-bin (string-append out "/bin")))
568 (install-file "bundles/dynbinary-daemon/dockerd" out-bin)
569 (install-file (string-append "bundles/dynbinary-daemon/dockerd-"
573 (add-after 'install 'remove-go-references
574 (assoc-ref go:%standard-phases 'remove-go-references)))))
576 `(("btrfs-progs" ,btrfs-progs)
577 ("containerd" ,containerd) ; for containerd-shim
578 ("coreutils" ,coreutils)
580 ("docker-proxy" ,docker-libnetwork-cmd-proxy)
581 ("e2fsprogs" ,e2fsprogs)
583 ("iproute2" ,iproute)
584 ("iptables" ,iptables)
586 ("libseccomp" ,libseccomp)
590 ("util-linux" ,util-linux)
593 ("xfsprogs" ,xfsprogs)
596 `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc)
598 ("gotestsum" ,gotestsum)
599 ("pkg-config" ,pkg-config)))
600 (synopsis "Docker container component library, and daemon")
601 (description "This package provides a framework to assemble specialized
602 container systems. It includes components for orchestration, image
603 management, secret management, configuration management, networking,
605 (home-page "https://mobyproject.org/")
606 (license license:asl2.0)))
608 (define-public docker-cli
611 (version %docker-version)
616 (url "https://github.com/docker/cli")
617 (commit (string-append "v" version))))
618 (file-name (git-file-name name version))
620 (base32 "1asapjj8brvbkd5irgdq82fx1ihrc14qaq30jxvjwflfm5yb7lv0"))))
621 (build-system go-build-system)
623 `(#:import-path "github.com/docker/cli"
624 ;; TODO: Tests require a running Docker daemon.
627 (modify-phases %standard-phases
628 (add-before 'build 'setup-environment-2
630 ;; Respectively, strip the symbol table and debug
631 ;; information, and the DWARF symbol table.
632 (setenv "LDFLAGS" "-s -w")
634 ;; Make sure "docker -v" prints a usable version string.
635 (setenv "VERSION" ,%docker-version)
637 ;; Make build reproducible.
638 (setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00")
639 (symlink "src/github.com/docker/cli/scripts" "./scripts")
640 (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile")
644 (invoke "./scripts/build/dynbinary")))
646 (lambda* (#:key make-flags tests? #:allow-other-keys)
647 (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH")))
649 ;; Use the newly-built docker client for the tests.
650 (with-directory-excursion "src/github.com/docker/cli"
651 ;; TODO: Run test-e2e as well?
652 (apply invoke "make" "-f" "docker.Makefile" "test-unit"
653 (or make-flags '())))
656 (lambda* (#:key outputs #:allow-other-keys)
657 (let* ((out (assoc-ref outputs "out"))
658 (out-bin (string-append out "/bin"))
659 (etc (string-append out "/etc")))
660 (with-directory-excursion "src/github.com/docker/cli/contrib/completion"
661 (install-file "bash/docker"
662 (string-append etc "/bash_completion.d"))
663 (install-file "fish/docker.fish"
664 (string-append etc "/fish/completions"))
665 (install-file "zsh/_docker"
666 (string-append etc "/zsh/site-functions")))
667 (install-file "build/docker" out-bin)
672 ("pkg-config" ,pkg-config)))
673 (synopsis "Command line interface to Docker")
674 (description "This package provides a command line interface to Docker.")
675 (home-page "https://www.docker.com/")
676 (license license:asl2.0)))
685 (url "https://github.com/savoirfairelinux/cqfd")
686 (commit (string-append "v" version))))
687 (file-name (git-file-name name version))
690 "1zqgznfl7slfrddfpy2pfmablbvyf7296d3b3vcprilqb93cc7li"))))
691 (build-system gnu-build-system)
693 ;; The test suite requires a docker daemon and connectivity.
696 (modify-phases %standard-phases
700 (lambda* (#:key outputs #:allow-other-keys)
701 (let ((out (assoc-ref outputs "out")))
702 ;; Fix the directory of the bash completion.
703 (substitute* "Makefile"
704 (("completionsdir=.*$")
705 (string-append "completionsdir=" out
706 "/etc/bash_completion.d; \\\n")))
707 (invoke "make" "install"
708 (string-append "PREFIX=" out))))))))
709 (home-page "https://github.com/savoirfairelinux/cqfd")
710 (synopsis "Convenience wrapper for Docker")
711 (description "cqfd is a Bash script that provides a quick and convenient
712 way to run commands in the current directory, but within a Docker container
713 defined in a per-project configuration file.")
714 (license license:gpl3+)))
723 (url "https://github.com/krallin/tini")
724 (commit (string-append "v" version))))
725 (file-name (git-file-name name version))
728 "1h20i3wwlbd8x4jr2gz68hgklh0lb0jj7y5xk1wvr8y58fip1rdn"))))
729 (build-system cmake-build-system)
731 `(#:tests? #f ;tests require a Docker daemon
732 #:phases (modify-phases %standard-phases
733 (add-after 'unpack 'disable-static-build
734 ;; Disable the static build as it fails to install, with
735 ;; the error: "No valid ELF RPATH or RUNPATH entry exists
738 (substitute* "CMakeLists.txt"
739 ((".*tini-static.*") ""))
741 (home-page "https://github.com/krallin/tini")
742 (synopsis "Tiny but valid init for containers")
743 (description "Tini is an init program specifically designed for use with
744 containers. It manages a single child process and ensures that any zombie
745 processes produced from it are reaped and that signals are properly forwarded.
746 Tini is integrated with Docker.")
747 (license license:expat)))