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>
This commit is contained in:
parent
e0945a02a4
commit
2b68a96422
2 changed files with 12 additions and 2 deletions
|
@ -27660,6 +27660,9 @@ Enable or disable the use of the Docker user-land networking proxy.
|
||||||
@item @code{debug?} (default @code{#f})
|
@item @code{debug?} (default @code{#f})
|
||||||
Enable or disable debug output.
|
Enable or disable debug output.
|
||||||
|
|
||||||
|
@item @code{enable-iptables?} (default @code{#t})
|
||||||
|
Enable or disable the addition of iptables rules.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,10 @@ loop-back communications.")
|
||||||
"Enable or disable the user-land proxy (enabled by default).")
|
"Enable or disable the user-land proxy (enabled by default).")
|
||||||
(debug?
|
(debug?
|
||||||
(boolean #f)
|
(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
|
(define %docker-accounts
|
||||||
(list (user-group (name "docker") (system? #t))))
|
(list (user-group (name "docker") (system? #t))))
|
||||||
|
@ -91,6 +94,7 @@ loop-back communications.")
|
||||||
(define (docker-shepherd-service config)
|
(define (docker-shepherd-service config)
|
||||||
(let* ((docker (docker-configuration-docker config))
|
(let* ((docker (docker-configuration-docker config))
|
||||||
(enable-proxy? (docker-configuration-enable-proxy? config))
|
(enable-proxy? (docker-configuration-enable-proxy? config))
|
||||||
|
(enable-iptables? (docker-configuration-enable-iptables? config))
|
||||||
(proxy (docker-configuration-proxy config))
|
(proxy (docker-configuration-proxy config))
|
||||||
(debug? (docker-configuration-debug? config)))
|
(debug? (docker-configuration-debug? config)))
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
|
@ -115,7 +119,10 @@ loop-back communications.")
|
||||||
'())
|
'())
|
||||||
(if #$enable-proxy? "--userland-proxy" "")
|
(if #$enable-proxy? "--userland-proxy" "")
|
||||||
"--userland-proxy-path" (string-append #$proxy
|
"--userland-proxy-path" (string-append #$proxy
|
||||||
"/bin/proxy"))
|
"/bin/proxy")
|
||||||
|
(if #$enable-iptables?
|
||||||
|
"--iptables"
|
||||||
|
"--iptables=false"))
|
||||||
#:pid-file "/var/run/docker.pid"
|
#:pid-file "/var/run/docker.pid"
|
||||||
#:log-file "/var/log/docker.log"))
|
#:log-file "/var/log/docker.log"))
|
||||||
(stop #~(make-kill-destructor)))))
|
(stop #~(make-kill-destructor)))))
|
||||||
|
|
Reference in a new issue