0

I have an ubuntu-server (versions 18 & 20) and want to update all packages on my machine except for the docker daemon.

After pinning the docker daemon version and running the apt upgrade, the service still got unavailable through some other dependency that got updated in the process.

How can I find out which packages cause the docker daemon to restart/become unavailable before running an update?

Theo
  • 153
  • 1
  • 11

1 Answers1

1

Instead of pinning the packages, set the docker packages on hold.

sudo apt-mark hold containerd.io docker-ce docker-ce-cli

I've been using this on docker machines for years without problems. When I want to do the upgrades, I remove the hold, upgrade the packages and set them back on hold.

This has the additional advantage that apt tells you when updates are available, but not installed.

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  containerd.io docker-ce docker-ce-cli
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89