Does someone knows how to install Docker with PPA packages to Ubuntu 20.10?
1 Answer
Hi mire12 and welcome to Ask Ubuntu. I hope you find the site useful and continue to use Ubuntu for years to come!
If you take a look at Docker's Installation Page you'll see that in order to configure the repository you are going to install docker
from you'll run:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
If you look closely you'll see the command lsb_release -cs
is run. If you try and execute that on your machine you'll get the distribution's codename. For Ubuntu 20.10 that would be groovy
as the release's name is Groovy Gorilla (really cool release name if you ask me :P). I'm not 100% sure this is what you'll get as I haven't updated yet though... Either way, I'm certain the output of lsb_release -cs
is none of focal
(20.04), bionic
(18.04), or xenial
(16.04) which are the ones docker
currently supports.
Then, if you run the sudo add-apt-command
you'll be adding the following repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu groovy stable
This doesn't exist as docker
only supports the three releases I listed before.
You then have two options.
The first one is to wait until they release a
docker
version for 20.10. I'm not sure if they will do so and if they do I don't know how long it'll take.You can manually run the command swapping
lsb_release -cs
forfocal
to use thedocker
version for Focal Fossa. This doesn't guarantee compatibility but I have done it some other times and it worked out fine. If you try to walk down this road you'll then have to run:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
focal \
stable"
I hope this works out for you! If it doesn't you could also try to manually download the .deb
file for docker
and install that with dpkg
. You can read more on that on the page I linked at the beginning (i.e. this one :P)
P.D:
The $()
structure used in the add-apt-repository
command is called a Command Substitution in Bash's lingo. What it's basically doing is replacing the whole $()
structure with the output of whatever is within the brackets. In our case that amounts to replacing $(lsb_release -cs)
with groovy
. That's why manually fixing a release codename is a feasible workaround.
You can read more on Command Substitution on Bash's manpage which you can read by running man bash
if Bash is installed. It's the default shell on Ubuntu so chances are it's the one you commonly use. The manpage is worth a read; I learned a lot by doing so :P. I'm citing a bit on Command Substitution explaining the above from the manpage so that you don't have to comb through it:
Command Substitution
Command substitution allows the output of a command to replace
the command name. There are two forms:
$(command)
or
`command`
Bash performs the expansion by executing command and replacing
the command substitution with the standard output of the command,
with any trailing newlines deleted.
Embedded newlines are not deleted, but they may be removed during
word splitting. The command substitution $(cat file) can be
replaced by the equivalent but faster $(< file).
You can also read it online here but I find reading manpages on a terminal emulator to be more appealing. I love the old-schooly vibe it has :P
-
-
-
1
-
1
-
sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-focal docker-ce-cli=5:19.03.13~3-0~ubuntu-focal containerd.io