Docker Repository Does Not Have a Release File on Running apt-get update on Ubuntu Docker Repository Does Not Have a Release File on Running apt-get update on Ubuntu docker docker

Docker Repository Does Not Have a Release File on Running apt-get update on Ubuntu


On Linux Mint, the official instructions did not work for me. I had to go into /etc/apt/sources.list.d/additional-repositories.list and change serena to xenial to reflect my Ubuntu codename. Depending on your Debian variant, version, and the original installation method followed, you may need to modify /etc/apt/sources.list.d/docker.list instead.

You can typically find the appropriate codename by running one of a few different commands. In the following examples, focal is the codename:

$ grep CODENAME /etc/os-releaseVERSION_CODENAME=focalUBUNTU_CODENAME=focal$ lsb_release -cCodename:   focal# NOTE: On Ubuntu 20.04.2, /etc/os-release is symlinked to /usr/lib/os-release and#       lsb_release reads from /usr/lib/os-release.


For Linux Mint, this problem is actually referenced in the Docker website:

Note: The lsb_release -cs sub-command below returns the name of your Ubuntu distribution, such as xenial. Sometimes, in a distribution like Linux Mint, you might have to change $(lsb_release -cs) to your parent Ubuntu distribution. For example, if you are using Linux Mint Rafaela, you could use trusty.

amd64:

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

The lsb_release -cs command gives a repository for which Docker has no prepared package - you must change it to xenial.

The correct command for Linux Mint 18 which is based on Ubuntu 16.04 Xenial is

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


Elliot Beach is correct. Thanks Elliot.

Here is the code from my gist.

sudo apt-get remove docker docker-engine docker.iosudo apt-get updatesudo apt-get install apt-transport-https ca-certificates curl software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo apt-key fingerprint 0EBFCD88sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \xenial \stable"sudo apt-get updatesudo apt-get install docker-cesudo docker run hello-world