Docker Community Forums

Share and learn in the Docker community.

Can't install docker on Ubuntu 20.04

OS Version:

NAME="Ubuntu"

VERSION="20.04 LTS (Focal Fossa)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 20.04 LTS"

VERSION_ID="20.04"

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

VERSION_CODENAME=focal

UBUNTU_CODENAME=focal

I am installing UNMS in that runs in the docker container per this: https://help.ui.com/hc/en-us/articles/360000119728

Here is the error:

E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.

This error seems to be docker related, as this URL https://download.docker.com/linux/ubuntu/dists/

does not contain focal.

is there a way to fix it?

I think the reason is there is not a folder under https://download.docker.com/linux/ubuntu/dists name ‘focal’.
Just need to wait docker team create this ‘focal’ folder after they pass all test, I guess.

I haven’t upgraded to 20 yet, but this happened to me with several packages in early days of earlier releases. They just haven’t officially released a focal version yet.

This is untested but you can try using their package for ubuntu 19.10 by manually changing your apt sources, its always worked for me before with docker and others, he repo gpg keys should be the same.

Open apt sources list in a text editor, like nano:
sudo nano /etc/apt/sources.list

(It might be in /etc/apt/sources.list.d/docker.list or something, depending how it was installed)

Scroll to the bottom and look for the lines:
deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu focal stable

Comment out that first line with a # at the beginning, then copy the same line right below it, except switching out the ubuntu codename focal for eoan.
It should end up looking like:
# deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
deb [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu focal stable

Ctrl+o to save, y to confirm filename, ctrl+x to close.

Then refresh your apt packages and try installing docker again :
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io

Like i said, i havent tested this yet for focal, but its always worked for me before.

When a 20.04 package is released, just go back in to that same file and remove the # from the line with focal, and comment out or just delete the line with eoan, then sudo apt update && sudo apt full-upgrade

1 Like

Worked for me. Thank you.

Any idea when we could expect it past a default of “when it’s ready”. Just a rough “end of month/next month/2021” would be good to know as to if I should wait for it for a deployment or look at something else.

It is fixed now. Make sure you use ubuntu repos and not debian.