This question already has an answer here:

Docker is becoming quite popular. I've used it as an end-user just 3 times, and it never worked as expected. But assuming it does work, can you please list some actual benefits? And contrast them with install scripts, for example (considering the overhead of the VM and the issues in VM-host communication).

There are two use-cases:

  • software that gets distributed to end-users for deployment
  • internal software that gets deployed on your own (or cloud) infrastructure.

Let's look at the 2nd case, which is more dominant. Why would I, as a developer, package my software with docker, if I can provide install scripts that do all of that, and thus have scriptable deployment without any extra overhead or learning curve? Or is docker mostly useful for the 1st usecase above?

marked as duplicate by gnat, Kilian Foth, Scant Roger Nov 19 '15 at 13:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Aha, so "marked as duplicate" of a closed question, because it's opinion-based, whereas the whole purpose of programmers.stackexchange vs stackoverflow is to allow moderately opinion based questions (besides, this is less about opionion and more about practical use-cases) – Bozho Nov 19 '15 at 14:21
  • recommended reading: What goes on Programmers.SE? A guide for Stack Overflow – gnat Nov 19 '15 at 15:44
  • 1
    And how does this question contradict the guidelines? – Bozho Nov 20 '15 at 12:49
  • stackoverflow.com/questions/16047306/… would be the SO version of the question that could be useful. – JB King Nov 20 '15 at 16:41

The primary advantage of Docker is the ability to create wholly deployable applications as build artifacts. The deployable applications can be run through test suites that verify that they operate correctly before promotion as production images.

This differs substantially from install scripts because the testing is done before production and less is subject to change.

I would not consider Docker to be a good solution for distributing software to end-users. I see it as internal software for your own cloud computing infrastructure.

As for the VMs vs containers discussion it seems that many CSPs (Cloud Service Providers) are building container offerings which make single VMs single Docker hosts. This seems like the worst of all worlds since it requires the additional setup of the containers and the coarse grained allocation of VMs beneath them. Secure container native infrastructure should be demanded by any customer running Docker in production. At minimum, container-based allocation and transparent distribution of containers across physical machines is essential.

  • "I would not consider Docker to be a good solution for distributing software to end-users. I see it as internal software for your own cloud computing infrastructure.", is there a specific reason please – Webwoman Feb 28 at 23:52
  • 1
    @Webwoman running native graphical macOS or Windows applications in Docker is either tricky or impractical. QubesOS is built entirely around app containers, but doesn't use Docker for it. macOS has app sandboxes. Windows has AppContainers. Docker requires (at least on macOS) dedicating memory, so you run into either overallocating and starving the user's other processes of memory or underprovisioning and having your container or others on the user's computer crash. I would use the target OS's app container or sandboxing framework rather than Docker. – Alain O'Dea Mar 1 at 19:58
  • I'm not sure I understand you, you talk about production image, so you use docker to release Windows or MacOS production's image if I understand your advice? Docker is a test suite for you or a kind of development enhancer's tool if I understand well? – Webwoman Mar 1 at 20:50
  • 1
    @Webwoman that is not what meant. I use docker at work both to locally test and production deploy code to run only Linux-targeted server-side code in AWS ECS (a Cloud-based container service). Docker produces portable images of entire services or server-side applications (including the underlying OS) that you can run in Docker locally or in a Docker-compatible service in a Cloud Service Provider. So server-side, Linux-targeted code, not Windows or macOS or anything desktop. – Alain O'Dea Mar 3 at 13:28

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