Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

closed as off-topic by andol, dawud, HBruijn, mdpc, Cristian Ciupitu Jul 11 '14 at 12:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – andol, dawud, HBruijn, Cristian Ciupitu
If this question can be reworded to fit the rules in the help center, please edit the question.

Docker and PPAs are completely different things. – melsayed Jul 10 '14 at 4:46
It's not clear to me what you're asking. Are you asking about packages and containers as ways of distributing software? Containerization and virtualization as ways of isolating programs? The PPA concept came from Ubuntu but how is RHEL 7 specifically relevant? – deltab Jul 10 '14 at 4:57
I decided to ask this question because someone had a question about dockers and how security is managed. PPA is sort of like a personal repo that can be accessed for package management isn't it? I guess more specifically, is a docker more like a sandbox with an app or suite of apps inside it that can be managed overall like a rpm? The question I have has more of a package management focus. – paulcube Jul 10 '14 at 5:33
Hi deltab, your answer made more sense after reading about docker. Docker seems to be the module concept made more modular and portable and more secure (you said "containerization and virtualization", and "isolating programs"). How are dockers managed? Currently, man pages doesn't seem to have a good section for a docker. Would a yum provides */docker ...type of deal be the method of searching for and then eventually downloading a docker app or suite of apps? – paulcube Jul 10 '14 at 5:53 – Iain Jul 10 '14 at 5:54
up vote 6 down vote accepted

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.

share|improve this answer
Yum and apt-get useful for figuring out dependency issues. Since Docker is gearing up to provide PAAS capabilities with the containers, if a system has multiple containers (instances) running, there could be added RAM load and disk space need. Not wasting cpu time can be better in general however. A follow up question for me is, what can Docker or a non-Docker process do that would allow for it to function more like a package manager (like yum and apt-get)? Thanks for answer. It sums up the differences for me. – paulcube Jul 10 '14 at 15:54
I think there should be a option for yum similar to yum groupinstall, like yum dockerinstall or yum lxcinstall. It would be nice. – paulcube Jul 11 '14 at 1:13
@paulcube dockerized services do not consume more ram than rpm packaged service. Also docker saves you're disk space by utilizing UFS layers. That is one of the key features... Of course it is up to you do use this feature by making a tree of dependencies and try to reuse same base images... But it is the same with RPM dependencies... However Stronger isolation of containers is key distinqusching to packages. You can run simillar containers in different versions of softwares tack on same machine... which can very fast cause problems with packages.. – aholbreich Jul 23 '15 at 15:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.