I'm trying to install docker on my Ubuntu 20.04. Trying install docker with apt-get
and snap
:
sudo apt-get install docker
Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
wmdocker
The following NEW packages will be installed:
docker wmdocker
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/14.3 kB of archives.
After this operation, 58.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package wmdocker.
(Reading database ... 193518 files and directories currently installed.)
Preparing to unpack .../wmdocker_1.5-2_amd64.deb ...
Unpacking wmdocker (1.5-2) ...
Selecting previously unselected package docker.
Preparing to unpack .../archives/docker_1.5-2_all.deb ...
Unpacking docker (1.5-2) ...
Setting up wmdocker (1.5-2) ...
Setting up docker (1.5-2) ...
Processing triggers for man-db (2.9.1-1) ...
If I run docker command I get error:
a@ubuntu:~$ docker
Command 'docker' not found, but can be installed with:
sudo snap install docker # version 19.03.11, or
sudo apt install docker.io # version 19.03.8-0ubuntu1.20.04.1
See 'snap info docker' for additional versions.
Why system can't find docker command?
Then I tied snap:
sudo snap install docker
And docker command run fine.
Why I can install docker with snap and can't with apt-get ?
docker.io
is Docker package in APT! – N0rbert Dec 05 '20 at 07:02docker.io
, docker's official documentation states, "Older versions of Docker were calleddocker
,docker.io
, ordocker-engine
". And the very first step is to remove them. ¯\(ツ)/¯ Anyway with Docker's repository you can have latest version in Xenial Xerus which is not the case withdocker.io
. – Kulfy Dec 05 '20 at 07:28docker
name confuses the user. Butdocker.io
is working normally when installed :) – N0rbert Dec 05 '20 at 07:41sudo snap install docker
and it can run hello-worlddocker run hello-world
– AVarf Apr 07 '22 at 09:38Unit docker.service could not be found.
) – AVarf Apr 07 '22 at 09:48