50

When I followed the community docks I came across the following issue:

 sudo add-apt-repository \
>    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
>    $(lsb_release -cs) \
>    stable"
[sudo] password for yogesh: 
Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu focal InRelease [265 kB]             
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                   
Ign:4 https://download.docker.com/linux/ubuntu focal InRelease                 
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease               
Hit:6 http://packages.microsoft.com/repos/vscode stable InRelease              
Err:7 https://download.docker.com/linux/ubuntu focal Release                   
  404  Not Found [IP: 54.182.0.11 443]
Hit:8 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:10 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:11 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Yogesh Jog
  • 1,889

4 Answers4

73

Update: As of 3 AM on May 15, the official Docker repository is available for Ubuntu Focal, so you can follow the installation guide on your Ubuntu to get Docker up and running.


Another option is to install Ubuntu-provided version of Docker:

sudo apt install docker.io

Long ago there were significant backlashes against this because the package docker.io from upstream (Debian) was too old - this is no longer the case. For Focal, docker.io is currently (Apr 24, 2020) at 19.03.8-0ubuntu1, which is satisfactorily new for the majority of Docker workloads.


Don't install docker by mistake - it used to be the system tray application, which has since been replaced by gnome-shell-extension-ubuntu-dock. The docker package can be safely removed had you installed it accidentally.

iBug
  • 1,859
49

Release file is available now. Follow the docker community guidelines.


As of today 28, April the release file for Ubuntu 20.04 LTS focal is not available.

So in order to install docker on Ubuntu 20.04 LTS focal release as guided on docker community link

you can change the following command :

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

to

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

By that what we are doing is we are using bionic (Ubuntu 18.04 LTS) release file.

Rest of the commands are okay and will work on 20.04 as well.

Also make sure that you removed the following entry from your /etc/apt/sources.list if present before installing docker

deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
Yogesh Jog
  • 1,889
3

You can install it using a single command

sudo apt install docker-compose

Atif
  • 594
2

Following steps can help you:

Run the following commands:

sudo apt-get update

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Open /etc/apt/sources.list file by running

sudo nano /etc/apt/sources.list

Comment out the following line:

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

Press Ctrl+o to save, ctrl+x to close.

enter image description here Run the following command to install docker:

sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io

Running the above command will successfully install docker:

enter image description here

You can verify the docker version to confirm if it has been installed successfully:

docker -v

enter image description here

EDIT:

If you are on AWS EC2 just run the following command and it will install the Docker there:

sudo apt install docker.io 
sudo systemctl enable --now docker
Raghav
  • 783