Why installing Docker from their repository and not from the default?
In the Docker docs in Install Docker Engine on Ubuntu there's an option of installing from the repository (along with the options to download the deb file and install it, and using the convenience script which also uses the repository). But I see that if I just run
sudo apt-get install docker.io
On my machine, it will download and run Docker perfectly.
My question is: Is there a difference between installing docker from their own repository or from the default repositories already configured?
Plus, when going by the docs, you should install 3 packages docker-ce
docker-ce-cli
and containerd.io
while when installing from the default repo you just install docker.io
.
What are all those different packages and what do they include?
Solution 1:
Check the version of the docker.io
that you've installed. At last check, Ubuntu was shipping 18.04, likely with their custom modifications. They may include dependencies on the other components, but components like the CLI were only recently broken out from the rest of the install.
By pulling directly from Docker's repos, you'll receive more recent versions, including security fixes, faster than Ubuntu can get them ported into their own repos. Right now, that is version 20.10.8.
By splitting out the containerd.io
install, they can update this component (it's a separate project that is built on it's own) separately from the docker engine. And by splitting out the CLI, use cases that only need the CLI to access a remote docker host, do not require installing the full engine locally. The docker engine itself is the docker-ce
install which receives requests from the CLI, manages networking and volumes, and sends the request to run the container to containerd
.
Solution 2:
Docker-ce
, docker-ce-cli
and containerd.io
are probably
the runtime, cli tools, and daemon, respectively.
It's quite possible that one package will have another as dependency,
so it will also be installed. Docker.io
certainly needs the engine
docker-ce
to be installed
Last, installing from the Docker website will get you the latest version, which perhaps is more advanced (and debugged) than the version in the repository.