summary refs log tree commit diff
diff options
context:
space:
mode:
authorJesse Dowell <jessedowell@gmail.com>2020-09-19 12:40:38 -0400
committerEfraim Flashner <efraim@flashner.co.il>2020-09-21 13:18:25 +0300
commitf0a09310e6ff2ed63770cb585c551ba94ce4a9d0 (patch)
treee9f11d223f96fcdaedb6fba01e4406846d3fead0
parent87a13a5e302f64e3ab6c7494242375f96dc83d6a (diff)
downloadguix-f0a09310e6ff2ed63770cb585c551ba94ce4a9d0.tar.gz
services: docker: Fix enable-proxy? option.
The userland proxy option does not properly disable the userland proxy when
set to false. Docker defaults to enabling the userland proxy if the option is
unset on the command line.

* gnu/services/docker.scm (docker-shepherd-service): Properly handle the
'enable-proxy?' option.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--gnu/services/docker.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index a4eccc7928..c7296d5b1b 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -121,9 +122,11 @@ loop-back communications.")
                            #$@(if debug?
                                   '("--debug" "--log-level=debug")
                                   '())
-                           (if #$enable-proxy? "--userland-proxy" "")
-                           "--userland-proxy-path" (string-append #$proxy
-                                                                  "/bin/proxy")
+                           #$@(if enable-proxy?
+                                  '("--userland-proxy=true"
+                                    (string-append
+                                      "--userland-proxy-path=" proxy "/bin/proxy"))
+                                  '("--userland-proxy=false"))
                            (if #$enable-iptables?
                                "--iptables"
                                "--iptables=false"))