github.com/caseyhadden/docker@v1.6.2/docs/sources/faq.md (about)

     1  page_title: FAQ page_description: Most frequently asked questions.
     2  page_keywords: faq, questions, documentation, docker
     3  
     4  # Frequently Asked Questions (FAQ)
     5  
     6  If you don't see your question here, feel free to submit new ones to
     7  <docs@docker.com>.  Or, you can fork [the
     8  repo](https://github.com/docker/docker) and contribute them yourself by editing
     9  the documentation sources.
    10  
    11  
    12  ### How much does Docker cost?
    13  
    14  Docker is 100% free. It is open source, so you can use it without paying.
    15  
    16  ### What open source license are you using?
    17  
    18  We are using the Apache License Version 2.0, see it here:
    19  [https://github.com/docker/docker/blob/master/LICENSE](
    20  https://github.com/docker/docker/blob/master/LICENSE)
    21  
    22  ### Does Docker run on Mac OS X or Windows?
    23  
    24  Docker currently runs only on Linux, but you can use VirtualBox to run Docker in
    25  a virtual machine on your box, and get the best of both worlds. Check out the
    26  [*Mac OS X*](../installation/mac/#macosx) and [*Microsoft
    27  Windows*](../installation/windows/#windows) installation guides. The small Linux
    28  distribution boot2docker can be run inside virtual machines on these two
    29  operating systems.
    30  
    31  {{ include "no-remote-sudo.md" }}
    32  
    33  ### How do containers compare to virtual machines?
    34  
    35  They are complementary. VMs are best used to allocate chunks of hardware
    36  resources. Containers operate at the process level, which makes them very
    37  lightweight and perfect as a unit of software delivery.
    38  
    39  ### What does Docker add to just plain LXC?
    40  
    41  Docker is not a replacement for LXC. "LXC" refers to capabilities of the Linux
    42  kernel (specifically namespaces and control groups) which allow sandboxing
    43  processes from one another, and controlling their resource allocations. On top
    44  of this low-level foundation of kernel features, Docker offers a high-level tool
    45  with several powerful functionalities:
    46  
    47   - *Portable deployment across machines.* Docker defines a format for bundling
    48   an application and all its dependencies into a single object which can be
    49   transferred to any Docker-enabled machine, and executed there with the
    50   guarantee that the execution environment exposed to the application will be the
    51   same. LXC implements process sandboxing, which is an important pre-requisite
    52   for portable deployment, but that alone is not enough for portable deployment.
    53   If you sent me a copy of your application installed in a custom LXC
    54   configuration, it would almost certainly not run on my machine the way it does
    55   on yours, because it is tied to your machine's specific configuration:
    56   networking, storage, logging, distro, etc. Docker defines an abstraction for
    57   these machine-specific settings, so that the exact same Docker container can
    58   run - unchanged - on many different machines, with many different
    59   configurations.
    60  
    61   - *Application-centric.* Docker is optimized for the deployment of
    62   applications, as opposed to machines. This is reflected in its API, user
    63   interface, design philosophy and documentation. By contrast, the `lxc` helper
    64   scripts focus on containers as lightweight machines - basically servers that
    65   boot faster and need less RAM. We think there's more to containers than just
    66   that.
    67  
    68   - *Automatic build.* Docker includes [*a tool for developers to automatically
    69   assemble a container from their source
    70   code*](../reference/builder/#dockerbuilder), with full control over application
    71   dependencies, build tools, packaging etc. They are free to use `make`, `maven`,
    72   `chef`, `puppet`, `salt,` Debian packages, RPMs, source tarballs, or any
    73   combination of the above, regardless of the configuration of the machines.
    74  
    75   - *Versioning.* Docker includes git-like capabilities for tracking successive
    76   versions of a container, inspecting the diff between versions, committing new
    77   versions, rolling back etc. The history also includes how a container was
    78   assembled and by whom, so you get full traceability from the production server
    79   all the way back to the upstream developer. Docker also implements incremental
    80   uploads and downloads, similar to `git pull`, so new versions of a container
    81   can be transferred by only sending diffs.
    82  
    83   - *Component re-use.* Any container can be used as a [*"base image"*](
    84   ../terms/image/#base-image-def) to create more specialized components. This can
    85   be done manually or as part of an automated build. For example you can prepare
    86   the ideal Python environment, and use it as a base for 10 different
    87   applications. Your ideal Postgresql setup can be re-used for all your future
    88   projects. And so on.
    89  
    90   - *Sharing.* Docker has access to a [public registry](https://hub.docker.com)
    91   where thousands of people have uploaded useful containers: anything from Redis,
    92   CouchDB, Postgres to IRC bouncers to Rails app servers to Hadoop to base images
    93   for various Linux distros. The
    94   [*registry*](../reference/api/registry_index_spec/#registryindexspec) also
    95   includes an official "standard library" of useful containers maintained by the
    96   Docker team. The registry itself is open-source, so anyone can deploy their own
    97   registry to store and transfer private containers, for internal server
    98   deployments for example.
    99  
   100   - *Tool ecosystem.* Docker defines an API for automating and customizing the
   101   creation and deployment of containers. There are a huge number of tools
   102   integrating with Docker to extend its capabilities. PaaS-like deployment
   103   (Dokku, Deis, Flynn), multi-node orchestration (Maestro, Salt, Mesos, Openstack
   104   Nova), management dashboards (docker-ui, Openstack Horizon, Shipyard),
   105   configuration management (Chef, Puppet), continuous integration (Jenkins,
   106   Strider, Travis), etc. Docker is rapidly establishing itself as the standard
   107   for container-based tooling.
   108  
   109  ### What is different between a Docker container and a VM?
   110  
   111  There's a great StackOverflow answer [showing the differences](
   112  http://stackoverflow.com/questions/16047306/how-is-docker-io-different-from-a-normal-virtual-machine).
   113  
   114  ### Do I lose my data when the container exits?
   115  
   116  Not at all! Any data that your application writes to disk gets preserved in its
   117  container until you explicitly delete the container. The file system for the
   118  container persists even after the container halts.
   119  
   120  ### How far do Docker containers scale?
   121  
   122  Some of the largest server farms in the world today are based on containers.
   123  Large web deployments like Google and Twitter, and platform providers such as
   124  Heroku and dotCloud all run on container technology, at a scale of hundreds of
   125  thousands or even millions of containers running in parallel.
   126  
   127  ### How do I connect Docker containers?
   128  
   129  Currently the recommended way to link containers is via the link primitive. You
   130  can see details of how to [work with links here](/userguide/dockerlinks).
   131  
   132  Also useful for more flexible service portability is the [Ambassador linking
   133  pattern](/articles/ambassador_pattern_linking/).
   134  
   135  ### How do I run more than one process in a Docker container?
   136  
   137  Any capable process supervisor such as [http://supervisord.org/](
   138  http://supervisord.org/), runit, s6, or daemontools can do the trick. Docker
   139  will start up the process management daemon which will then fork to run
   140  additional processes. As long as the processor manager daemon continues to run,
   141  the container will continue to as well. You can see a more substantial example
   142  [that uses supervisord here](/articles/using_supervisord/).
   143  
   144  ### What platforms does Docker run on?
   145  
   146  Linux:
   147  
   148   - Ubuntu 12.04, 13.04 et al 
   149   - Fedora 19/20+ 
   150   - RHEL 6.5+ 
   151   - CentOS 6+ 
   152   - Gentoo 
   153   - ArchLinux 
   154   - openSUSE 12.3+ 
   155   - CRUX 3.0+
   156  
   157  Cloud:
   158  
   159   - Amazon EC2 
   160   - Google Compute Engine 
   161   - Rackspace
   162  
   163  ### How do I report a security issue with Docker?
   164  
   165  You can learn about the project's security policy
   166  [here](https://www.docker.com/security/) and report security issues to this
   167  [mailbox](mailto:security@docker.com).
   168  
   169  ### Why do I need to sign my commits to Docker with the DCO?
   170  
   171  Please read [our blog post](
   172  http://blog.docker.com/2014/01/docker-code-contributions-require-developer-certificate-of-origin/) on the introduction of the DCO.
   173  
   174  ### When building an image, should I prefer system libraries or bundled ones?
   175  
   176  *This is a summary of a discussion on the [docker-dev mailing list](
   177  https://groups.google.com/forum/#!topic/docker-dev/L2RBSPDu1L0).*
   178  
   179  Virtually all programs depend on third-party libraries. Most frequently, they
   180  will use dynamic linking and some kind of package dependency, so that when
   181  multiple programs need the same library, it is installed only once.
   182  
   183  Some programs, however, will bundle their third-party libraries, because they
   184  rely on very specific versions of those libraries. For instance, Node.js bundles
   185  OpenSSL; MongoDB bundles V8 and Boost (among others).
   186  
   187  When creating a Docker image, is it better to use the bundled libraries, or
   188  should you build those programs so that they use the default system libraries
   189  instead?
   190  
   191  The key point about system libraries is not about saving disk or memory space.
   192  It is about security. All major distributions handle security seriously, by
   193  having dedicated security teams, following up closely with published
   194  vulnerabilities, and disclosing advisories themselves. (Look at the [Debian
   195  Security Information](https://www.debian.org/security/) for an example of those
   196  procedures.) Upstream developers, however, do not always implement similar
   197  practices.
   198  
   199  Before setting up a Docker image to compile a program from source, if you want
   200  to use bundled libraries, you should check if the upstream authors provide a
   201  convenient way to announce security vulnerabilities, and if they update their
   202  bundled libraries in a timely manner. If they don't, you are exposing yourself
   203  (and the users of your image) to security vulnerabilities.
   204  
   205  Likewise, before using packages built by others, you should check if the
   206  channels providing those packages implement similar security best practices.
   207  Downloading and installing an "all-in-one" .deb or .rpm sounds great at first,
   208  except if you have no way to figure out that it contains a copy of the OpenSSL
   209  library vulnerable to the [Heartbleed](http://heartbleed.com/) bug.
   210  
   211  ### Why is `DEBIAN_FRONTEND=noninteractive` discouraged in Dockerfiles?
   212  
   213  When building Docker images on Debian and Ubuntu you may have seen errors like:
   214  
   215      unable to initialize frontend: Dialog
   216  
   217  These errors don't stop the image from being built but inform you that the
   218  installation process tried to open a dialog box, but was unable to. Generally,
   219  these errors are safe to ignore.
   220  
   221  Some people circumvent these errors by changing the `DEBIAN_FRONTEND`
   222  environment variable inside the Dockerfile using:
   223  
   224      ENV DEBIAN_FRONTEND=noninteractive
   225  
   226  This prevents the installer from opening dialog boxes during installation which
   227  stops the errors.
   228  
   229  While this may sound like a good idea, it *may* have side effects. The
   230  `DEBIAN_FRONTEND` environment variable will be inherited by all images and
   231  containers built from your image, effectively changing their behavior. People
   232  using those images will run into problems when installing software
   233  interactively, because installers will not show any dialog boxes.
   234  
   235  Because of this, and because setting `DEBIAN_FRONTEND` to `noninteractive` is
   236  mainly a 'cosmetic' change, we *discourage* changing it.
   237  
   238  If you *really* need to change its setting, make sure to change it back to its
   239  [default value](https://www.debian.org/releases/stable/i386/ch05s03.html.en)
   240  afterwards.
   241  
   242  ### Why do I get `Connection reset by peer` when making a request to a service running in a container?
   243  
   244  Typically, this message is returned if the service is already bound to your
   245  localhost. As a result, requests coming to the container from outside are
   246  dropped. To correct this problem, change the service's configuration on your
   247  localhost so that the service accepts requests from all IPs.  If you aren't sure
   248  how to do this, check the documentation for your OS.
   249  
   250  
   251  ### Where can I find more answers?
   252  
   253  You can find more answers on:
   254  
   255  
   256  - [Docker user mailinglist](https://groups.google.com/d/forum/docker-user) 
   257  - [Docker developer mailinglist](https://groups.google.com/d/forum/docker-dev) 
   258  - [IRC, docker on freenode](irc://chat.freenode.net#docker) 
   259  - [GitHub](https://github.com/docker/docker) 
   260  - [Ask questions on Stackoverflow](http://stackoverflow.com/search?q=docker) 
   261  - [Join the conversation on Twitter](http://twitter.com/docker)
   262  
   263  Looking for something else to read? Checkout the [User Guide](/userguide/).