When I followed the community docks I came across the following issue:
sudo add-apt-repository \
> "deb [arch=amd64] \
> $(lsb_release -cs) \
> stable"
[sudo] password for yogesh:
Hit:1 bionic InRelease
Get:2 focal InRelease [265 kB]
Ign:3 stable InRelease
Ign:4 focal InRelease
Hit:5 focal-security InRelease
Hit:6 stable InRelease
Err:7 focal Release 404 Not Found [IP: 54.182.0.11 443]
Hit:8 stable Release
Hit:10 focal-updates InRelease
Hit:11 focal-backports InRelease
Reading package lists... Done
E: The repository ' 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. 3 4 Answers
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.ioLong 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.
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] \ $(lsb_release -cs) \ stable"to
$ sudo add-apt-repository \ "deb [arch=amd64] \ 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] focal stable 4 You can install it using a single command
sudo apt install docker-compose
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 | sudo apt-key add -Open /etc/apt/sources.list file by running
sudo nano /etc/apt/sources.listComment out the following line:
#deb [arch=amd64] focal stablePress Ctrl+o to save, ctrl+x to close.
Run the following command to install docker:
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.ioRunning the above command will successfully install docker:
You can verify the docker version to confirm if it has been installed successfully:
docker -vEDIT:
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 3