I spent more than 6 hours straight on this (April 2026) and not even GPT nor Gemnin could fix it.
But someone from these forums found it and helped us, back in Sep 2024.
ISSUE:
On a fresh cloud droplett Ubuntu 24.04, updated and following the exact steps, it fails to install docker-ce.
dockers official docs - fail.
digitalocean ubuntu-22-04 - fail.
ERRORS:
This is some, not all, enough for a searching person to be helped tho.
Package docker-ce is not available, but is referred to by another package.
Package docker-ce-cli is not available, but is referred to by another package.
E: Package ‘docker-ce’ has no installation candidate
E: Package ‘docker-ce-cli’ has no installation candidate
and
W: GPG error: https download docker com/linux/ubuntu noble InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
E: The repository https download docker com/linux/ubuntu noble InRelease’ is not signed.
THE FIX:
https://forums.docker.com/t/installing-docker-on-buster-e-package-docker-ce-has-no-installation-candidate/108397/15
About 3/4 down is lrchuanzai leonli. They wrote this, and it worked:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Thank you kind sir, this is still relevant 2 years later.