apt install docker.io fails in Vultr cloud on Ubuntu 20.04

I create VPS with API in Vultr Cloud. I have UserScript for a year and half. (UserScript is executed when VPS starting) That UserScript first installs docker

apt install --yes docker.io

then pulls image and runs it.

Last week apt install --yes docker.io started failing.

Partial fix for the issue is:

ip link add name docker0 type bridge
ip addr add dev docker0 172.17.0.1/16
sleep 30 
systemctl restart docker

If I create new VPS manually without UserScript and type apt install --yes docker.io then I still get error.

I tried most recent Ubuntu 21.10 and there is same issue. I tried snap instead of apt and I get same issue.

But if I run Ubuntu 20.04 in AWS then I still can install docker with apt install --yes docker.io Same true for Linode and DigitalOcean. It seems no such problem with Fedora in Vultr.

I noticed some changes how Vultr assign IP addresses recenly. So it seems they broke something with recent change and I contacted them but I got unexpectedly unhelpful response that Vultr is self managed service and they will not help with issues like docker.

Any ideas what may course the problem? I do not post error logs as I already posted fix and logs are big.

Error initializing network controller: list bridge addresses failed: PredefinedLocalScopeDefaultNetworks List

May be some other Vultr clients that use docker in Ubuntu here?


Try the following steps, if it will work for you.

[admin@localhost]$ sudo apt-get remove docker docker-engine docker.io containerd runc

[admin@localhost]$ apt-get update
[admin@localhost]$ apt-get install -y ca-certificates curl gnupg lsb-release
[admin@localhost]$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
[admin@localhost]$ apt-get update
[admin@localhost]$ apt-get
[admin@localhost]$ apt-get install docker-ce docker-ce-cli containerd.io