81

Trying to learn docker here but I am a bit confused on what the difference is between docker.io and docker. Is docker.io the daemon server and docker the client? Why does the daemon need to run all the time?

6 Answers 6

48

You probably want docker.io.

The docker.io package is the Docker containerization software; whereas, the docker package is a tray plugin for docking applications to the desktop UI.


Running:

sudo apt-get install docker.io

installs package described as "Docker complements kernel namespacing with a high level API which operates at the process level." That is, the Docker everyone is usually thinking about when they say Docker.

Running:

sudo apt-get install docker

installs a package described as a "System tray for KDE3/GNOME2 applications"

Running:

sudo apt-cache search ^docker

displays descriptions of packages that start with the word "docker".


To make things more confusing, the snap package management tool uses the name docker to refer to the container, not the tray.

1
  • I don't remember how installed docker on my ubuntu, but it is here. Does that mean that sudo apt-get install docker.io is no longer necessary? (I am following a step by step how to on some software) Commented Apr 24, 2023 at 10:53
18

docker-io is the deb package name used by Ubuntu distribution docker-engine is the deb package name from the official Docker Ubuntu distribution.

Probably you want docker-engine because the Ubuntu one is too old and buggy to be used. As of today Ubuntu has 1.6.2 and Docker registry has 1.12.0 !

In terms of Docker, 1.6.2 counts as stone-age.

3
  • 5
    The difference seems to have narrowed now in Xenial: Ubuntu's docker.io 1.12.3 vs Docker's docker-engine 1.13.1.
    – Pierz
    Commented Feb 20, 2017 at 16:47
  • @Pierz but will ubuntu upgrade within the same release? Before 18.04 the difference will probably widen again ;)
    – nafg
    Commented Mar 2, 2017 at 3:43
  • 4
    one year later, "mind the gap": the versions available via docker(.com) vs the ubuntu pkg repo is now so wide it's hard to even compare (as of mid-2017, ubuntu 17.04 (zesty)). What was called docker-engine from docker.com is now split into docker-ce and docker-ee (a free "community edition" & paid "enterprise edition", respectively), and docker-compose must be installed either from git or via pip install docker-compose to get the correct, corresponding latest version. Presently, sadly, one must simply avoid ubuntu repos for all things docker.
    – michael
    Commented Jul 30, 2017 at 23:30
9

Docker is the name of the open platform for developers and sysadmins to build, ship, and run distributed applications. Docker.io on the other hand is the name of the package that you install in your Linux OS (i.e. Ubuntu). See this link here.

In terms of how it works, the Docker Engine consists of two parts: a daemon, a server process that manages all the containers, and a client, which acts as a remote control for the daemon. I would suggest you to try a quick demo they have on their site, located here.

From a usability standpoint, you invoke the Docker client anytime you use the docker command.

1
  • 6
    Yes, but that doesn't say anything about the two different processes, namely docker and docker.io
    – Pithikos
    Commented Jul 18, 2014 at 15:30
7

It seems docker is just a symbolic link to docker.io:

> file $(which docker)
/usr/local/bin/docker: symbolic link to `/usr/bin/docker.io'

So we can assume that docker.io is both the daemon and the client process, just invoked with different flags I assume?!

1
  • 1
    That's it exactly. docker.io uses the same binary for both client and server/daemon.
    – Rob Wells
    Commented Apr 17, 2016 at 15:22
7

Talking about Debian packages: docker.io is the name of the package provided by Debian/Ubuntu, while docker is the name of the package provided by docker.com.

Technically, these packages are built differently: for docker.io the build dependencies are fetched from Debian packages, while for docker, the build dependencies are in-tree, in the vendor directory.

If you want more details, I wrote a detailed blog post at: https://www.collabora.com/news-and-blog/blog/2018/07/04/docker-io-debian-package-back-to-life/

1
  • That was a good article. It sounds like you guys did a lot of work. Has anything changed since 2018? What is your recommendation today?
    – TrojanName
    Commented Apr 26, 2023 at 15:34
0

These are just all names: "docker.io" is name of package, and "docker" is name of the binary that interact with the daemon, which is "dockerd".

So when you run the command:

dpkg --listfiles docker.io

These files are listed:

/usr/bin/docker
/usr/bin/docker-init
/usr/bin/docker-proxy
/usr/bin/dockerd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .