summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2022-07-02 13:41:06 +0300
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-07-13 21:36:41 -0400
commitb33e1a183f6756514e6b6a3b84054a232dbddad4 (patch)
tree61fbe608e29d1fae7491a268906327e2fdd4dac0 /gnu/services
parent5f8adea86cac1e0b126b181a4d3cc67c0503f43b (diff)
services: docker: Fix race condition.
Fixes <https://issues.guix.gnu.org/38432>. * gnu/packages/patches/containerd-create-pid-file.patch: New file. * gnu/local.mk (dist_patch_DATA): Add this. * gnu/packages/docker.scm (containerd)[source]: Add this patch. * gnu/services/docker.scm (containerd-shepherd-service): Add #:pid-file and #:pid-file-timeout. * gnu/services/docker.scm (docker-shepherd-service): Add --containerd flag. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/docker.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index 846ebe8334..741bab5a8c 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -98,6 +98,8 @@ loop-back communications.")
;; For finding containerd-shim binary.
#:environment-variables
(list (string-append "PATH=" #$containerd "/bin"))
+ #:pid-file "/run/containerd/containerd.pid"
+ #:pid-file-timeout 300
#:log-file "/var/log/containerd.log"))
(stop #~(make-kill-destructor)))))
@@ -135,7 +137,8 @@ loop-back communications.")
'("--userland-proxy=false"))
(if #$enable-iptables?
"--iptables"
- "--iptables=false"))
+ "--iptables=false")
+ "--containerd" "/run/containerd/containerd.sock")
#:environment-variables
(list #$@environment-variables)
#:pid-file "/var/run/docker.pid"