aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorAlexey Abramov <levenson@mmer.org>2020-08-16 10:09:07 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-08-16 11:07:50 +0200
commit2b68a96422575b14e54c9a7e3d0033f6231a6b4d (patch)
treed1164e3a0cb593ad8a62fcc1c5484700dd101317 /gnu/services
parente0945a02a41afe31d99e3920aa9f7e2239df7bb7 (diff)
downloadguix-2b68a96422575b14e54c9a7e3d0033f6231a6b4d.tar
guix-2b68a96422575b14e54c9a7e3d0033f6231a6b4d.tar.gz
services: docker: Add 'enable-iptables?' argument.
* gnu/services/docker.scm (docker-configuration): Define the argument. * gnu/services/docker.scm (docker-shepherd-service): Use it. * doc/guix.texi (Docker Service): Document it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/docker.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index 937dff7bdb..380a942ed2 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -56,7 +56,10 @@ loop-back communications.")
"Enable or disable the user-land proxy (enabled by default).")
(debug?
(boolean #f)
- "Enable or disable debug output."))
+ "Enable or disable debug output.")
+ (enable-iptables?
+ (boolean #t)
+ "Enable addition of iptables rules (enabled by default)."))
(define %docker-accounts
(list (user-group (name "docker") (system? #t))))
@@ -91,6 +94,7 @@ loop-back communications.")
(define (docker-shepherd-service config)
(let* ((docker (docker-configuration-docker config))
(enable-proxy? (docker-configuration-enable-proxy? config))
+ (enable-iptables? (docker-configuration-enable-iptables? config))
(proxy (docker-configuration-proxy config))
(debug? (docker-configuration-debug? config)))
(shepherd-service
@@ -115,7 +119,10 @@ loop-back communications.")
'())
(if #$enable-proxy? "--userland-proxy" "")
"--userland-proxy-path" (string-append #$proxy
- "/bin/proxy"))
+ "/bin/proxy")
+ (if #$enable-iptables?
+ "--iptables"
+ "--iptables=false"))
#:pid-file "/var/run/docker.pid"
#:log-file "/var/log/docker.log"))
(stop #~(make-kill-destructor)))))