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 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>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages docker)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (gnu packages)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system go)
34 #:use-module (guix build-system python)
35 #:use-module (guix utils)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages golang)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages networking)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages python-crypto)
47 #:use-module (gnu packages python-web)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages version-control)
50 #:use-module (gnu packages virtualization))
52 ;; Note - when changing Docker versions it is important to update the versions
53 ;; of several associated packages (docker-libnetwork and go-sctp).
54 (define %docker-version "19.03.12")
56 (define-public python-docker
58 (name "python-docker")
63 (uri (pypi-uri "docker" version))
66 "0qmrcvpaz37p85hfddsd4yc8hgqlkzs4cz09q9wmy0pz5pwajqm0"))))
67 (build-system python-build-system)
68 ;; TODO: Tests require a running Docker daemon.
69 (arguments '(#:tests? #f))
71 `(("python-requests" ,python-requests-2.20)
72 ("python-six" ,python-six)
73 ("python-urllib3" ,python-urllib3-1.24)))
75 `(("python-docker-pycreds" ,python-docker-pycreds)
76 ("python-paramiko" ,python-paramiko) ;adds SSH support
77 ("python-websocket-client" ,python-websocket-client)))
78 (home-page "https://github.com/docker/docker-py/")
79 (synopsis "Python client for Docker")
80 (description "Docker-Py is a Python client for the Docker container
82 (license license:asl2.0)))
84 (define-public python-dockerpty
86 (name "python-dockerpty")
91 (uri (pypi-uri "dockerpty" version))
94 "1kjn64wx23jmr8dcc6g7bwlmrhfmxr77gh6iphqsl39sayfxdab9"))))
95 (build-system python-build-system)
97 `(("python-six" ,python-six)))
98 (home-page "https://github.com/d11wtq/dockerpty")
99 (synopsis "Python library to use the pseudo-TTY of a Docker container")
100 (description "Docker PTY provides the functionality needed to operate the
101 pseudo-terminal (PTY) allocated to a Docker container using the Python
103 (license license:asl2.0)))
105 (define-public docker-compose
107 (name "docker-compose")
112 (uri (pypi-uri "docker-compose" version))
115 "1ww8ckpj3n5jdg63qvmiqx3gk0fsrnynnnqj17fppymbwjzf5fps"))))
116 (build-system python-build-system)
117 ;; TODO: Tests require running Docker daemon.
118 (arguments '(#:tests? #f))
120 `(("python-cached-property"
121 ,python-cached-property)
122 ("python-docker" ,python-docker)
123 ("python-dockerpty" ,python-dockerpty)
124 ("python-docopt" ,python-docopt)
125 ("python-jsonschema" ,python-jsonschema)
126 ("python-pyyaml" ,python-pyyaml)
127 ("python-requests" ,python-requests)
128 ("python-six" ,python-six)
129 ("python-texttable" ,python-texttable)
130 ("python-websocket-client" ,python-websocket-client)))
131 (home-page "https://www.docker.com/")
132 (synopsis "Multi-container orchestration for Docker")
133 (description "Docker Compose is a tool for defining and running
134 multi-container Docker applications. A Compose file is used to configure an
135 application’s services. Then, using a single command, the containers are
136 created and all the services are started as specified in the configuration.")
137 (license license:asl2.0)))
139 (define-public python-docker-pycreds
141 (name "python-docker-pycreds")
146 (uri (pypi-uri "docker-pycreds" version))
149 "1m44smrggnqghxkqfl7vhapdw89m1p3vdr177r6cq17lr85jgqvc"))))
150 (build-system python-build-system)
153 (modify-phases %standard-phases
154 (add-after 'unpack 'fix-versioning
156 (substitute* "test-requirements.txt"
157 (("3.0.2") ,(package-version python-pytest))
158 (("2.3.1") ,(package-version python-pytest-cov))
159 (("2.4.1") ,(package-version python-flake8)))
162 `(("python-flake8" ,python-flake8)
163 ("python-pytest" ,python-pytest)
164 ("python-pytest-cov" ,python-pytest-cov)))
166 `(("python-six" ,python-six)))
167 (home-page "https://github.com/shin-/dockerpy-creds")
169 "Python bindings for the Docker credentials store API")
171 "Docker-Pycreds contains the Python bindings for the docker credentials
172 store API. It allows programmers to interact with a Docker registry using
173 Python without keeping their credentials in a Docker configuration file.")
174 (license license:asl2.0)))
176 (define-public containerd
184 (url "https://github.com/containerd/containerd")
185 (commit (string-append "v" version))))
186 (file-name (git-file-name name version))
188 (base32 "0npbzixf3c0jvzm159vygvkydrr8h36c9sq50yv0mdinrys2bvg0"))
190 (search-patches "containerd-test-with-go1.13.patch"))))
191 (build-system go-build-system)
193 `(#:import-path "github.com/containerd/containerd"
195 (modify-phases %standard-phases
196 (add-after 'chdir 'patch-paths
197 (lambda* (#:key inputs import-path outputs #:allow-other-keys)
198 ;; TODO: Patch "socat", "unpigz".
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/loopback/loopback_linux.go"
215 (("exec\\.Command\\(\"losetup\"") ; )
216 (string-append "exec.Command(\""
217 (assoc-ref inputs "util-linux")
218 "/sbin/losetup\""))) ;)
221 (lambda* (#:key import-path (make-flags '()) #:allow-other-keys)
222 (with-directory-excursion (string-append "src/" import-path)
223 (apply invoke "make" make-flags))))
225 (lambda* (#:key import-path outputs (make-flags '()) #:allow-other-keys)
226 (with-directory-excursion (string-append "src/" import-path)
227 (let* ((out (assoc-ref outputs "out")))
228 (apply invoke "make" (string-append "DESTDIR=" out) "install"
231 `(("btrfs-progs" ,btrfs-progs)
232 ("libseccomp" ,libseccomp)
234 ("util-linux" ,util-linux)))
237 ("pkg-config" ,pkg-config)))
238 (synopsis "Docker container runtime")
239 (description "This package provides the container daemon for Docker.
240 It includes image transfer and storage, container execution and supervision,
241 network attachments.")
242 (home-page "https://containerd.io/")
243 (license license:asl2.0)))
245 ;;; Private package that shouldn't be used directly; its purposes is to be
246 ;;; used as a template for the various packages it contains. It doesn't build
247 ;;; anyway, as it needs many dependencies that aren't being satisfied.
248 (define docker-libnetwork
249 ;; There are no recent release for libnetwork, so choose the last commit of
250 ;; the branch that Docker uses, as can be seen in the Docker source file
251 ;; 'hack/dockerfile/install/proxy.installer'. NOTE - It is important that
252 ;; this version is kept in sync with the version of Docker being used.
253 ;; This commit is the "bump_19.03" branch, as mentioned in Docker's vendor.conf.
254 (let ((commit "026aabaa659832804b01754aaadd2c0f420c68b6")
255 (version (version-major+minor %docker-version))
258 (name "docker-libnetwork")
259 (version (git-version version revision commit))
263 ;; Redirected from github.com/docker/libnetwork.
264 (url "https://github.com/moby/libnetwork")
266 (file-name (git-file-name name version))
269 "0bli21vn5v7bssw3ydym4jfdjsldhb47fld88kng7d138wl70lkw"))
270 ;; Delete bundled ("vendored") free software source code.
271 (modules '((guix build utils)))
273 (delete-file-recursively "vendor")
275 (build-system go-build-system)
277 `(#:import-path "github.com/moby/libnetwork/"))
278 (home-page "https://github.com/moby/libnetwork/")
279 (synopsis "Networking for containers")
280 (description "Libnetwork provides a native Go implementation for
281 connecting containers. The goal of @code{libnetwork} is to deliver a robust
282 container network model that provides a consistent programming interface and
283 the required network abstractions for applications.")
284 (license license:asl2.0))))
286 (define-public docker-libnetwork-cmd-proxy
288 (inherit docker-libnetwork)
289 (name "docker-libnetwork-cmd-proxy")
291 `(#:import-path "github.com/docker/libnetwork/cmd/proxy"
292 #:unpack-path "github.com/docker/libnetwork"
293 #:install-source? #f))
295 `(("go-sctp" ,go-sctp)
297 ("logrus" ,go-github-com-sirupsen-logrus)
298 ("go-netlink" ,go-netlink)
299 ("go-netns" ,go-netns)
300 ("go-golang-org-x-crypto"
301 ,go-golang-org-x-crypto)
302 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
303 (synopsis "Docker user-space proxy")
304 (description "A proxy running in the user space. It is used by the
305 built-in registry server of Docker.")
306 (license license:asl2.0)))
308 ;; TODO: Patch out modprobes for ip_vs, nf_conntrack,
309 ;; brige, nf_conntrack_netlink, aufs.
310 (define-public docker
313 (version %docker-version)
318 (url "https://github.com/docker/engine")
319 (commit (string-append "v" version))))
320 (file-name (git-file-name name version))
322 (base32 "1dj6llfcgcbpq9q9j6b4wb0anbn1g5wzm8ikq2lyhg54i3154m93"))
324 (search-patches "docker-fix-tests.patch"))))
325 (build-system gnu-build-system)
328 ((guix build gnu-build-system)
329 ((guix build go-build-system) #:prefix go:)
333 (,@%gnu-build-system-modules
335 (guix build go-build-system))
337 (modify-phases %standard-phases
338 (add-after 'unpack 'patch-paths
339 (lambda* (#:key inputs #:allow-other-keys)
340 (substitute* "builder/builder-next/executor_unix.go"
341 (("CommandCandidates:.*runc.*")
342 (string-append "CommandCandidates: []string{\""
343 (assoc-ref inputs "runc")
344 "/sbin/runc\"},\n")))
345 (substitute* "vendor/github.com/containerd/go-runc/runc.go"
346 (("DefaultCommand = .*")
347 (string-append "DefaultCommand = \""
348 (assoc-ref inputs "runc")
350 (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go"
351 (("defaultRuntime[ \t]*=.*")
352 (string-append "defaultRuntime = \""
353 (assoc-ref inputs "runc")
355 (("defaultShim[ \t]*=.*")
356 (string-append "defaultShim = \""
357 (assoc-ref inputs "containerd")
358 "/bin/containerd-shim\"\n")))
359 (substitute* "daemon/daemon_unix.go"
360 (("DefaultShimBinary = .*")
361 (string-append "DefaultShimBinary = \""
362 (assoc-ref inputs "containerd")
363 "/bin/containerd-shim\"\n"))
364 (("DefaultRuntimeBinary = .*")
365 (string-append "DefaultRuntimeBinary = \""
366 (assoc-ref inputs "runc")
368 (("DefaultRuntimeName = .*")
369 (string-append "DefaultRuntimeName = \""
370 (assoc-ref inputs "runc")
372 (substitute* "daemon/config/config.go"
373 (("StockRuntimeName = .*")
374 (string-append "StockRuntimeName = \""
375 (assoc-ref inputs "runc")
377 (("DefaultInitBinary = .*")
378 (string-append "DefaultInitBinary = \""
379 (assoc-ref inputs "tini")
381 (substitute* "daemon/config/config_common_unix_test.go"
382 (("expectedInitPath: \"docker-init\"")
383 (string-append "expectedInitPath: \""
384 (assoc-ref inputs "tini")
386 (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go"
387 (("var defaultCommandCandidates = .*")
388 (string-append "var defaultCommandCandidates = []string{\""
389 (assoc-ref inputs "runc") "/sbin/runc\"}")))
390 (substitute* "vendor/github.com/docker/libnetwork/portmapper/proxy.go"
391 (("var userlandProxyCommandName = .*")
392 (string-append "var userlandProxyCommandName = \""
393 (assoc-ref inputs "docker-proxy")
395 (substitute* "pkg/archive/archive.go"
397 (string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz")))
398 ;; TODO: Remove when Docker proper uses v1.14.x to build
399 (substitute* "registry/resumable/resumablerequestreader_test.go"
400 (("I%27m%20not%20an%20url" all)
401 (string-append "\"" all "\"")))
402 ;; TODO: Remove when Docker proper uses v1.14.x to build
403 (substitute* "vendor/gotest.tools/x/subtest/context.go"
404 (("func \\(tc \\*testcase\\) Cleanup\\(" all)
405 (string-append all "func()"))
406 (("tc\\.Cleanup\\(" all)
407 (string-append all "nil")))
409 (let ((source-files (filter (lambda (name)
410 (not (string-contains name "test")))
411 (find-files "." "\\.go$"))))
412 (let-syntax ((substitute-LookPath*
414 ((_ (source-text package relative-path) ...)
415 (substitute* source-files
416 (((string-append "\\<exec\\.LookPath\\(\""
420 (assoc-ref inputs package)
422 "\", error(nil)")) ...))))
425 ((_ (source-text package relative-path) ...)
426 (substitute* source-files
427 (((string-append "\\<(re)?exec\\.Command\\(\""
430 (string-append (if re? re? "")
432 (assoc-ref inputs package)
435 (substitute-LookPath*
436 ("containerd" "containerd" "bin/containerd")
437 ("ps" "procps" "bin/ps")
438 ("mkfs.xfs" "xfsprogs" "bin/mkfs.xfs")
439 ("lvmdiskscan" "lvm2" "sbin/lvmdiskscan")
440 ("pvdisplay" "lvm2" "sbin/pvdisplay")
441 ("blkid" "util-linux" "sbin/blkid")
442 ("unpigz" "pigz" "bin/unpigz")
443 ("iptables" "iptables" "sbin/iptables")
444 ("iptables-legacy" "iptables" "sbin/iptables")
445 ("ip" "iproute2" "sbin/ip"))
448 ("modprobe" "kmod" "bin/modprobe")
449 ("pvcreate" "lvm2" "sbin/pvcreate")
450 ("vgcreate" "lvm2" "sbin/vgcreate")
451 ("lvcreate" "lvm2" "sbin/lvcreate")
452 ("lvconvert" "lvm2" "sbin/lvconvert")
453 ("lvchange" "lvm2" "sbin/lvchange")
454 ("mkfs.xfs" "xfsprogs" "sbin/mkfs.xfs")
455 ("xfs_growfs" "xfsprogs" "sbin/xfs_growfs")
456 ("mkfs.ext4" "e2fsprogs" "sbin/mkfs.ext4")
457 ("tune2fs" "e2fsprogs" "sbin/tune2fs")
458 ("blkid" "util-linux" "sbin/blkid")
459 ("resize2fs" "e2fsprogs" "sbin/resize2fs")
460 ("ps" "procps" "bin/ps")
461 ("losetup" "util-linux" "sbin/losetup")
462 ("uname" "coreutils" "bin/uname")
463 ("dbus-launch" "dbus" "bin/dbus-launch")
464 ("git" "git" "bin/git")))
465 ;; docker-mountfrom ??
468 ;; docker-applyLayer ??
473 ;; Make compilation fail when, in future versions, Docker
474 ;; invokes other programs we don't know about and thus don't
476 (substitute* source-files
477 ;; Search for Java in PATH.
478 (("\\<exec\\.Command\\(\"java\"")
479 "xxec.Command(\"java\"")
480 ;; Search for AUFS in PATH (mainline Linux doesn't support it).
481 (("\\<exec\\.Command\\(\"auplink\"")
482 "xxec.Command(\"auplink\"")
483 ;; Fail on other unsubstituted commands.
484 (("\\<exec\\.Command\\(\"([a-zA-Z0-9][a-zA-Z0-9_-]*)\""
486 (string-append "exec.Guix_doesnt_want_Command(\""
488 (("\\<xxec\\.Command")
490 ;; Search for ZFS in PATH.
491 (("\\<LookPath\\(\"zfs\"\\)") "LooxPath(\"zfs\")")
492 ;; Fail on other unsubstituted LookPaths.
493 (("\\<LookPath\\(\"") "Guix_doesnt_want_LookPath\\(\"")
494 (("\\<LooxPath") "LookPath")))
496 (add-after 'patch-paths 'delete-failing-tests
498 ;; Needs internet access.
499 (delete-file "builder/remotecontext/git/gitutils_test.go")
500 ;; Permission denied.
501 (delete-file "daemon/graphdriver/devmapper/devmapper_test.go")
502 ;; Operation not permitted (idtools.MkdirAllAndChown).
503 (delete-file "daemon/graphdriver/vfs/vfs_test.go")
504 ;; Timeouts after 5 min.
505 (delete-file "plugin/manager_linux_test.go")
506 ;; Operation not permitted.
507 (delete-file "daemon/graphdriver/aufs/aufs_test.go")
508 (delete-file "daemon/graphdriver/btrfs/btrfs_test.go")
509 (delete-file "daemon/graphdriver/overlay/overlay_test.go")
510 (delete-file "daemon/graphdriver/overlay2/overlay_test.go")
511 (delete-file "pkg/chrootarchive/archive_unix_test.go")
512 (delete-file "daemon/container_unix_test.go")
513 ;; This file uses cgroups and /proc.
514 (delete-file "pkg/sysinfo/sysinfo_linux_test.go")
515 ;; This file uses cgroups.
516 (delete-file "runconfig/config_test.go")
517 ;; This file uses /var.
518 (delete-file "daemon/oci_linux_test.go")
522 (setenv "DOCKER_BUILDTAGS" "seccomp")
523 (setenv "DOCKER_GITCOMMIT" (string-append "v" ,%docker-version))
524 (setenv "VERSION" (string-append ,%docker-version "-ce"))
525 ;; Automatically use bundled dependencies.
526 ;; TODO: Unbundle - see file "vendor.conf".
527 (setenv "AUTO_GOPATH" "1")
528 ;; Respectively, strip the symbol table and debug
529 ;; information, and the DWARF symbol table.
530 (setenv "LDFLAGS" "-s -w")
532 (setenv "GOCACHE" "/tmp")
534 (add-before 'build 'setup-go-environment
535 (assoc-ref go:%standard-phases 'setup-go-environment))
538 ;; Our LD doesn't like the statically linked relocatable things
539 ;; that go produces, so install the dynamic version of
541 (invoke "hack/make.sh" "dynbinary")))
544 ;; The build process generated a file because the environment
545 ;; variable "AUTO_GOPATH" was set. Use it.
546 (setenv "GOPATH" (string-append (getcwd) "/.gopath"))
547 ;; ".gopath/src/github.com/docker/docker" is a link to the current
548 ;; directory and chdir would canonicalize to that.
549 ;; But go needs to have the uncanonicalized directory name, so
551 (setenv "PWD" (string-append (getcwd)
552 "/.gopath/src/github.com/docker/docker"))
553 (with-directory-excursion ".gopath/src/github.com/docker/docker"
554 (invoke "hack/test/unit"))
558 (lambda* (#:key outputs #:allow-other-keys)
559 (let* ((out (assoc-ref outputs "out"))
560 (out-bin (string-append out "/bin")))
561 (install-file "bundles/dynbinary-daemon/dockerd" out-bin)
562 (install-file (string-append "bundles/dynbinary-daemon/dockerd-"
566 (add-after 'install 'remove-go-references
567 (assoc-ref go:%standard-phases 'remove-go-references)))))
569 `(("btrfs-progs" ,btrfs-progs)
570 ("containerd" ,containerd) ; for containerd-shim
571 ("coreutils" ,coreutils)
573 ("docker-proxy" ,docker-libnetwork-cmd-proxy)
574 ("e2fsprogs" ,e2fsprogs)
576 ("iproute2" ,iproute)
577 ("iptables" ,iptables)
579 ("libseccomp" ,libseccomp)
583 ("util-linux" ,util-linux)
586 ("xfsprogs" ,xfsprogs)
589 `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc)
591 ("gotestsum" ,gotestsum)
592 ("pkg-config" ,pkg-config)))
593 (synopsis "Docker container component library, and daemon")
594 (description "This package provides a framework to assemble specialized
595 container systems. It includes components for orchestration, image
596 management, secret management, configuration management, networking,
598 (home-page "https://mobyproject.org/")
599 (license license:asl2.0)))
601 (define-public docker-cli
604 (version %docker-version)
609 (url "https://github.com/docker/cli")
610 (commit (string-append "v" version))))
611 (file-name (git-file-name name version))
613 (base32 "1bynmnaykhh1m42v6bxparlpm9kajpqsvlrlwgz1b9ivcklf5ik6"))))
614 (build-system go-build-system)
616 `(#:import-path "github.com/docker/cli"
617 ;; TODO: Tests require a running Docker daemon.
620 (modify-phases %standard-phases
621 (add-before 'build 'setup-environment-2
623 ;; Respectively, strip the symbol table and debug
624 ;; information, and the DWARF symbol table.
625 (setenv "LDFLAGS" "-s -w")
627 ;; Make sure "docker -v" prints a usable version string.
628 (setenv "VERSION" ,%docker-version)
630 ;; Make build reproducible.
631 (setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00")
632 (symlink "src/github.com/docker/cli/scripts" "./scripts")
633 (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile")
637 (invoke "./scripts/build/dynbinary")))
639 (lambda* (#:key make-flags tests? #:allow-other-keys)
640 (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH")))
642 ;; Use the newly-built docker client for the tests.
643 (with-directory-excursion "src/github.com/docker/cli"
644 ;; TODO: Run test-e2e as well?
645 (apply invoke "make" "-f" "docker.Makefile" "test-unit"
646 (or make-flags '())))
649 (lambda* (#:key outputs #:allow-other-keys)
650 (let* ((out (assoc-ref outputs "out"))
651 (out-bin (string-append out "/bin"))
652 (etc (string-append out "/etc")))
653 (with-directory-excursion "src/github.com/docker/cli/contrib/completion"
654 (install-file "bash/docker"
655 (string-append etc "/bash_completion.d"))
656 (install-file "fish/docker.fish"
657 (string-append etc "/fish/completions"))
658 (install-file "zsh/_docker"
659 (string-append etc "/zsh/site-functions")))
660 (install-file "build/docker" out-bin)
665 ("pkg-config" ,pkg-config)))
666 (synopsis "Command line interface to Docker")
667 (description "This package provides a command line interface to Docker.")
668 (home-page "https://www.docker.com/")
669 (license license:asl2.0)))
678 (url "https://github.com/savoirfairelinux/cqfd")
679 (commit (string-append "v" version))))
680 (file-name (git-file-name name version))
683 "1zqgznfl7slfrddfpy2pfmablbvyf7296d3b3vcprilqb93cc7li"))))
684 (build-system gnu-build-system)
686 ;; The test suite requires a docker daemon and connectivity.
689 (modify-phases %standard-phases
693 (lambda* (#:key outputs #:allow-other-keys)
694 (let ((out (assoc-ref outputs "out")))
695 ;; Fix the directory of the bash completion.
696 (substitute* "Makefile"
697 (("completionsdir=.*$")
698 (string-append "completionsdir=" out
699 "/etc/bash_completion.d; \\\n")))
700 (invoke "make" "install"
701 (string-append "PREFIX=" out))))))))
702 (home-page "https://github.com/savoirfairelinux/cqfd")
703 (synopsis "Convenience wrapper for Docker")
704 (description "cqfd is a Bash script that provides a quick and convenient
705 way to run commands in the current directory, but within a Docker container
706 defined in a per-project configuration file.")
707 (license license:gpl3+)))
716 (url "https://github.com/krallin/tini")
717 (commit (string-append "v" version))))
718 (file-name (git-file-name name version))
721 "1h20i3wwlbd8x4jr2gz68hgklh0lb0jj7y5xk1wvr8y58fip1rdn"))))
722 (build-system cmake-build-system)
724 `(#:tests? #f ;tests require a Docker daemon
725 #:phases (modify-phases %standard-phases
726 (add-after 'unpack 'disable-static-build
727 ;; Disable the static build as it fails to install, with
728 ;; the error: "No valid ELF RPATH or RUNPATH entry exists
731 (substitute* "CMakeLists.txt"
732 ((".*tini-static.*") ""))
734 (home-page "https://github.com/krallin/tini")
735 (synopsis "Tiny but valid init for containers")
736 (description "Tini is an init program specifically designed for use with
737 containers. It manages a single child process and ensures that any zombie
738 processes produced from it are reaped and that signals are properly forwarded.
739 Tini is integrated with Docker.")
740 (license license:expat)))