aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMichaƂ Kosek <mihao@users.noreply.github.com>2019-07-09 15:34:13 +0200
committerSebastiaan van Stijn <github@gone.nl>2020-11-04 14:01:17 +0100
commit009639e0f46d270309821998836fb664046b3e07 (patch)
treefae1bd459bcd575f0c9680dd857f1b2f566db72f /contrib
parent21578530d7291f2e7bc0b90ace2f058df753a443 (diff)
Do not "Bind" docker "To" containerd.
relates to https://github.com/docker/for-linux/issues/678 When using the BindTo directive, Docker is permanently stopped by systemd when containerd is temporarily killed and restarted; Using `Requires` achieves mostly the same, but defines a weaker dependency; https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Requires= > Requires= > > .. If this unit gets activated, the units listed will be activated as well. > If one of the other units fails to activate, and an ordering dependency > After= on the failing unit is set, this unit will not be started. Besides, > with or without specifying After=, this unit will be stopped if one of the > other units is explicitly stopped. We may want to look into using `Wants=` instead of `Requires=`, because that allows docker to continue running if containerd is restarted, quoting the systemd documentation: > Often, it is a better choice to use Wants= instead of Requires= in order > to achieve a system that is more robust when dealing with failing services. Given that docker will likely still fail if the containerd socket is not present, startup will fail if containerd is not running, but if containerd is restarted, the docker daemon may be able to try reconnecting. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/init/systemd/docker.service3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/init/systemd/docker.service b/contrib/init/systemd/docker.service
index 9c1d9e6d37..0a6a3064a4 100644
--- a/contrib/init/systemd/docker.service
+++ b/contrib/init/systemd/docker.service
@@ -1,10 +1,9 @@
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
-BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service multi-user.target
Wants=network-online.target
-Requires=docker.socket
+Requires=docker.socket containerd.service
[Service]
Type=notify