github.com/sbward/docker@v1.4.2-0.20150114010528-c9dab702bed3/docs/sources/faq.md (about)

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