chaosxian
(Chaosxian)
December 17, 2022, 1:18am
1
Just got hit by a dodgy (?) update, that took out my docker containers. I’m unsure what tripped it, but here is the upgrade list:
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt list --upgradable
Listing... Done
containerd.io/bullseye 1.6.13-1 amd64 [upgradable from: 1.6.12-1]
docker-ce-cli/bullseye 5:20.10.22~3-0~debian-bullseye amd64 [upgradable from: 5:20.10.21~3-0~debian-bullseye]
docker-ce-rootless-extras/bullseye 5:20.10.22~3-0~debian-bullseye amd64 [upgradable from: 5:20.10.21~3-0~debian-bullseye]
docker-ce/bullseye 5:20.10.22~3-0~debian-bullseye amd64 [upgradable from: 5:20.10.21~3-0~debian-bullseye]
docker-compose-plugin/bullseye 2.14.1~debian-bullseye amd64 [upgradable from: 2.12.2~debian-bullseye]
docker-scan-plugin/bullseye 0.23.0~debian-bullseye amd64 [upgradable from: 0.21.0~debian-bullseye]
After reboot docker ps
came up empty.
Fortunately I was able to roll back.
Suggestions?
rimelek
(Ákos Takács)
December 18, 2022, 5:10pm
2
docker ps
shows only containers. Containers will not survive upgrading Docker unless you enable live-restore
. docker ps -a
may show you stopped containers and you can run them again.
chaosxian
(Chaosxian)
December 18, 2022, 8:39pm
3
All containers were “lost” as the update overwrote docker.service
, which pointed to an alternate path for the docker data using --data-root /path/to/data
. Complete chaos resulted.
Now using daemon.json
to point to data.
Thanks for responding.
rimelek
(Ákos Takács)
December 18, 2022, 8:51pm
4
Never change the systemd service files directly. You can run systemctl edit docker.service
to create a new file to override the default parameters.
In your case using daemon.json
was a better choice.
chaosxian
(Chaosxian)
December 18, 2022, 8:56pm
5
Good to know. Lots of misinformation on the web. The overlay2 directory had taken over the /
partition, and I ran with the first “solution” I found.
Thanks for this.