Question

docker-ce no candidate at Ubuntu 22.04?

When I follow https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-22-04 until

sudo apt install docker-ce

it fails because it has no candidate

root@ubuntu-xwiki:~# apt-cache policy docker-ce
docker-ce:
  Installed: (none)
  Candidate: (none)
  Version table:

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

In addition to what has already been mentioned, alternatively, you could use the Docker convenience installation script by running the following:

  • Download the script:
curl -fsSL https://get.docker.com -o get-docker.sh
  • Run the script:
sudo sh get-docker.sh

Hope that this helps.

Best,

Bobby

Hi @helgeaasen,

before you try and install docker, you’ll fist need to do a few quick steps:

  1. apt update
  2. apt upgrade

The above commands are always mandatory before any installation. Next would be the required dependencies:

  1. apt install lsb-release ca-certificates apt-transport-https software-properties-common -y

Once that’s done, you’ll need to add the repository from which you’ll be installing docker

  1. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Once that’s done, execute the following to add it to your Ubuntu’s repository list:

  1. echo "deb [arch=$(dpkg --print-architecture) 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

Do an

  1. apt update

just in case and then you should be good to go on the docker installation:

  1. apt install docker-ce