1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Some updates to the README.md

* Updated pre-reqs for 0.9.
* Fixed a couple of docker to Docker.
* Fixed the Docker build example to be correct.
* Reformatted a bunch of paragraphs

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
This commit is contained in:
James Turnbull 2014-03-04 07:53:22 -05:00
parent fbc00df7a0
commit 046e6604e5

107
README.md
View file

@ -4,19 +4,19 @@ Docker: the Linux container engine
Docker is an open source project to pack, ship and run any application Docker is an open source project to pack, ship and run any application
as a lightweight container as a lightweight container
Docker containers are both *hardware-agnostic* and Docker containers are both *hardware-agnostic* and *platform-agnostic*.
*platform-agnostic*. This means that they can run anywhere, from your This means that they can run anywhere, from your laptop to the largest
laptop to the largest EC2 compute instance and everything in between - EC2 compute instance and everything in between - and they don't require
and they don't require that you use a particular language, framework that you use a particular language, framework or packaging system. That
or packaging system. That makes them great building blocks for makes them great building blocks for deploying and scaling web apps,
deploying and scaling web apps, databases and backend services without databases and backend services without depending on a particular stack
depending on a particular stack or provider. or provider.
Docker is an open-source implementation of the deployment engine which Docker is an open-source implementation of the deployment engine which
powers [dotCloud](http://dotcloud.com), a popular powers [dotCloud](http://dotcloud.com), a popular Platform-as-a-Service.
Platform-as-a-Service. It benefits directly from the experience It benefits directly from the experience accumulated over several years
accumulated over several years of large-scale operation and support of of large-scale operation and support of hundreds of thousands of
hundreds of thousands of applications and databases. applications and databases.
![Docker L](docs/theme/docker/static/img/dockerlogo-h.png "Docker") ![Docker L](docs/theme/docker/static/img/dockerlogo-h.png "Docker")
@ -24,10 +24,10 @@ hundreds of thousands of applications and databases.
A common method for distributing applications and sandboxing their A common method for distributing applications and sandboxing their
execution is to use virtual machines, or VMs. Typical VM formats are execution is to use virtual machines, or VMs. Typical VM formats are
VMWare's vmdk, Oracle Virtualbox's vdi, and Amazon EC2's ami. In VMWare's vmdk, Oracle Virtualbox's vdi, and Amazon EC2's ami. In theory
theory these formats should allow every developer to automatically these formats should allow every developer to automatically package
package their application into a "machine" for easy distribution and their application into a "machine" for easy distribution and deployment.
deployment. In practice, that almost never happens, for a few reasons: In practice, that almost never happens, for a few reasons:
* *Size*: VMs are very large which makes them impractical to store * *Size*: VMs are very large which makes them impractical to store
and transfer. and transfer.
@ -47,39 +47,37 @@ deployment. In practice, that almost never happens, for a few reasons:
service discovery. service discovery.
By contrast, Docker relies on a different sandboxing method known as By contrast, Docker relies on a different sandboxing method known as
*containerization*. Unlike traditional virtualization, *containerization*. Unlike traditional virtualization, containerization
containerization takes place at the kernel level. Most modern takes place at the kernel level. Most modern operating system kernels
operating system kernels now support the primitives necessary for now support the primitives necessary for containerization, including
containerization, including Linux with [openvz](http://openvz.org), Linux with [openvz](http://openvz.org),
[vserver](http://linux-vserver.org) and more recently [vserver](http://linux-vserver.org) and more recently
[lxc](http://lxc.sourceforge.net), Solaris with [lxc](http://lxc.sourceforge.net), Solaris with
[zones](http://docs.oracle.com/cd/E26502_01/html/E29024/preface-1.html#scrolltoc) [zones](http://docs.oracle.com/cd/E26502_01/html/E29024/preface-1.html#scrolltoc)
and FreeBSD with and FreeBSD with
[Jails](http://www.freebsd.org/doc/handbook/jails.html). [Jails](http://www.freebsd.org/doc/handbook/jails.html).
Docker builds on top of these low-level primitives to offer developers Docker builds on top of these low-level primitives to offer developers a
a portable format and runtime environment that solves all 4 portable format and runtime environment that solves all 4 problems.
problems. Docker containers are small (and their transfer can be Docker containers are small (and their transfer can be optimized with
optimized with layers), they have basically zero memory and cpu layers), they have basically zero memory and cpu overhead, they are
overhead, they are completely portable and are designed from the completely portable and are designed from the ground up with an
ground up with an application-centric design. application-centric design.
The best part: because ``docker`` operates at the OS level, it can The best part: because Docker operates at the OS level, it can still be
still be run inside a VM! run inside a VM!
## Plays well with others ## Plays well with others
Docker does not require that you buy into a particular programming Docker does not require that you buy into a particular programming
language, framework, packaging system or configuration language. language, framework, packaging system or configuration language.
Is your application a Unix process? Does it use files, tcp Is your application a Unix process? Does it use files, tcp connections,
connections, environment variables, standard Unix streams and environment variables, standard Unix streams and command-line arguments
command-line arguments as inputs and outputs? Then ``docker`` can run as inputs and outputs? Then Docker can run it.
it.
Can your application's build be expressed as a sequence of such Can your application's build be expressed as a sequence of such
commands? Then ``docker`` can build it. commands? Then Docker can build it.
## Escape dependency hell ## Escape dependency hell
@ -126,14 +124,11 @@ build command inherits the result of the previous commands, the
Here's a typical Docker build process: Here's a typical Docker build process:
```bash ```bash
from ubuntu:12.10 FROM ubuntu:12.04
run apt-get update RUN apt-get update
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y python RUN apt-get install -q -y python python-pip curl
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y python-pip RUN curl -L https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv
run pip install django RUN cd helloflask-master && pip install -r requirements.txt
run DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl
run curl -L https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv
run cd helloflask-master && pip install -r requirements.txt
``` ```
Note that Docker doesn't care *how* dependencies are built - as long Note that Docker doesn't care *how* dependencies are built - as long
@ -143,22 +138,25 @@ as they can be built by running a Unix command in a container.
Getting started Getting started
=============== ===============
Docker can be installed on your local machine as well as servers - both bare metal and virtualized. Docker can be installed on your local machine as well as servers - both
It is available as a binary on most modern Linux systems, or as a VM on Windows, Mac and other systems. bare metal and virtualized. It is available as a binary on most modern
Linux systems, or as a VM on Windows, Mac and other systems.
We also offer an interactive tutorial for quickly learning the basics of using Docker. We also offer an interactive tutorial for quickly learning the basics of
using Docker.
For up-to-date install instructions and online tutorials, see the [Getting Started page](http://www.docker.io/gettingstarted/).
For up-to-date install instructions and online tutorials, see the
[Getting Started page](http://www.docker.io/gettingstarted/).
Usage examples Usage examples
============== ==============
Docker can be used to run short-lived commands, long-running daemons (app servers, databases etc.), Docker can be used to run short-lived commands, long-running daemons
interactive shell sessions, etc. (app servers, databases etc.), interactive shell sessions, etc.
You can find a [list of real-world examples](http://docs.docker.io/en/latest/examples/) in the documentation. You can find a [list of real-world
examples](http://docs.docker.io/en/latest/examples/) in the
documentation.
Under the hood Under the hood
-------------- --------------
@ -170,13 +168,7 @@ Under the hood, Docker is built on the following components:
and and
[namespacing](http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part) [namespacing](http://blog.dotcloud.com/under-the-hood-linux-kernels-on-dotcloud-part)
capabilities of the Linux kernel; capabilities of the Linux kernel;
* [AUFS](http://aufs.sourceforge.net/aufs.html), a powerful union * The [Go](http://golang.org) programming language.
filesystem with copy-on-write capabilities;
* The [Go](http://golang.org) programming language;
* [lxc](http://lxc.sourceforge.net/), a set of convenience scripts to
simplify the creation of Linux containers.
Contributing to Docker Contributing to Docker
====================== ======================
@ -187,7 +179,6 @@ started [here](CONTRIBUTING.md).
They are probably not perfect, please let us know if anything feels They are probably not perfect, please let us know if anything feels
wrong or incomplete. wrong or incomplete.
### Legal ### Legal
*Brought to you courtesy of our legal counsel. For more context, *Brought to you courtesy of our legal counsel. For more context,