I understand PPAs but Docker is new to me. How are Docker and Dockerfiles different from Ubuntu's Personal Package Archives (PPA), in terms of package management?
closed as off-topic by andol, dawud, HBruijn, mdpc, Cristian Ciupitu Jul 11 at 12:40
This question appears to be off-topic. The users who voted to close gave this specific reason:
Packages and container images are two ways of distributing software while avoiding conflicts, although they do so using quite different approaches.
Packages are bundles of files that are installed by a package manager such as RPM in RHEL or APT in Ubuntu, which checks to make sure that multiple packages use compatible libraries, do not use the same filenames, etc., before writing the files into one shared filesystem. Users can then start programs directly.
Packages usually come from repositories, and it's up to the people running the repositories to decide which package gets control of each filename, network port, system user ID, etc., as well as which versions of programs get packaged. Packages are built from specification files that list which files should be included.
PPAs (Personal Package Archives) allow individuals and small groups to publish their own packages, for software that hasn't yet been accepted into the main repositories.
Containers are sandboxes in which a program or group of programs can run, isolated from the rest of the system. Thanks to the Linux kernel's support for per-process namespaces, they can only access their own files (with a separate root directory and mount table), network interfaces, etc. (Like a much more comprehensive form of chroot.)
Because a container can only access its own files, there are images, bundles of files that form the initial state of a container. There's no need for the same kind of coordination as there is with packages, because of the sandboxing. Each container includes the particular versions of libraries that it needs.
Docker is a container manager: it starts up containers from specified images, sets up their network interfaces, logs their output, etc.
It also manages images: it can build them from scripts called Dockerfiles, and upload them to and download them from the Docker Hub, a set of (mostly) user-controlled repositories.
The two approaches can be combined: you can create an image based on a minimal RHEL or Ubuntu image, and install packages within it using yum or apt-get running inside a container.
The reverse could also be possible: a package could install an image, though I've not heard of anyone doing that.
And of course the easiest way to install Docker itself is with a package manager.
Likewise, there's still roles for configuration management systems like Puppet and Chef: setting up containers on the inside, or controlling which containers are deployed on which machines and connecting them all together.