"Package 'docker-ce' has no installation candidate" in 18.04

Run this if you want to install the docker-ce on Ubuntu 18.04:

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"
sudo apt update
sudo apt install docker-ce

To check if the installation ended successfuly, just run:

docker -v

should output:

Docker version 18.06.1-ce, build e68fc7a

From the same guide you referenced, you can use repository for 17.10 instead at this moment:

deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable

And all docker-ce dependent packages will be resolved from the ubuntu bionic repository. Check the Docker documentation for more info. No compatibility issues to worry about :)

2018-07-19 update

Docker 18.06 has been updated to bionic repository, this workaround is not required anymore!


Some of the guides jumped the gun; docker-ce is not available for Ubuntu 18.04 yet. You can check the list of supported versions here.

That same guide you linked to suggested installing docker.io; this is what I did. It's a workaround until docker-ce supports 18.04.

Tags:

Docker

Apt

18.04