Unable to locate package `docker-ce` on a 64bit ubuntu

Ubuntu 20.10 (Groovy)

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 groovy stable"

Ubuntu 20.04 (Focal)

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 focal stable"

Ubuntu 19.10 (Eoan)

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 eoan stable"

Ubuntu 19.04 (Disco)

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 disco stable"

Ubuntu 18.10 (Cosmic)

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 cosmic test"

Ubuntu 18.04 (bionic)

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 stable"

Ubuntu 17.10

docker-ce package is available on the official docker (Ubutu Artful) repository , to install it use the following commands :

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 artful stable"

Ubuntu 16.04

You can install docker-ce on Ubuntu as follows:

sudo apt-get 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 xenial stable"

Run the following:

sudo apt update
apt-cache search docker-ce

sample output:

docker-ce - Docker: the open-source application container engine

Install docker-ce:

For Ubuntu 16.04 you need to run sudo apt update. For Ubuntu 18.04 and higher, add-apt-repository will execute apt update automatically:

sudo apt install docker-ce

To check the available Ubuntu codenames:

curl -sSL  https://download.docker.com/linux/ubuntu/dists/ |awk -F'"' 'FNR >7 {print $2}'

Docker , OS requirements


For anyone who is using Ubuntu 17.10 (artful) and having this problem:

From https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

To install Docker CE, you need the 64-bit version of one of these Ubuntu versions:

Artful 17.10 (Docker CE 17.11 Edge only)

Zesty 17.04

Xenial 16.04

(LTS) Trusty 14.04 (LTS)

and:

To add the edge or test repository, add the word edge or test (or both) after the word stable in the commands

So if you are using Ubuntu 17.10 (artful), you need to add this:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable edge"

Noticing "edge" word is added. If you already ran this command before without "edge". You can edit the source.list file at /etc/apt/sources.list. After that, refresh and install docker-ce as usual:

sudo apt-get update
sudo apt-get install docker-ce

Try using:

$ 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 $(lsb_release -cs) stable"

$ sudo apt-get update
$  sudo apt install docker.io