As a workaround I opted for using a systemd unit file to create a loose dependency between containerd and dockerd.
Here's how:
As root:
Make the override directory (permission 755)
mkdir /etc/systemd/system/containerd.service.d/
Create the override file in the above directory (permissions 644)
vi override.conf
Add the following to the file
[Unit] Before=docker.service Wants=docker.service
Restart systemd daemon
systemctl daemon-reload
Check it works
Stop containerd
systemctl stop containerd
Check dockerd has stopped
systemctl status docker
Start containerd
systemctl start containerd
Check dockerd has started
systemctl status docker ++++++++++++++++++++++++++
Some links to other documentation on the subject
https://www.shellhacks.com/systemd-service-file-example/
https://man7.org/linux/man-pages/man5/systemd.service.5.html
As a workaround I opted for using a systemd unit file to create a loose dependency between containerd and dockerd.
Here's how:
As root:
Make the override directory (permission 755)
mkdir /etc/systemd/ system/ containerd. service. d/
Create the override file in the above directory (permissions 644)
vi override.conf
Add the following to the file
[Unit] docker. service service
Before=
Wants=docker.
Restart systemd daemon
systemctl daemon-reload
Check it works
Stop containerd
systemctl stop containerd
Check dockerd has stopped
systemctl status docker
Start containerd
systemctl start containerd
Check dockerd has started
systemctl status docker +++++++ +++++++ +++++
+++++++
Some links to other documentation on the subject
https:/ /www.shellhacks .com/systemd- service- file-example/
https:/ /man7.org/ linux/man- pages/man5/ systemd. service. 5.html