|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
Docker is a process manager with superpowers
|
|
|
|
|
============================================
|
|
|
|
|
Docker: the Linux container runtime
|
|
|
|
|
===================================
|
|
|
|
|
|
|
|
|
|
It encapsulates heterogeneous payloads in Standard Containers, and runs them on any server with strong guarantees of isolation and repeatability.
|
|
|
|
|
Docker complements LXC with a high-level API with operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers.
|
|
|
|
|
|
|
|
|
|
Is is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc.
|
|
|
|
|
|
|
|
|
|
@@ -53,37 +53,6 @@ Under the hood, Docker is built on the following components:
|
|
|
|
|
Install instructions
|
|
|
|
|
==================
|
|
|
|
|
|
|
|
|
|
Installing with Vagrant
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
Currently, Docker can be installed with Vagrant both on your localhost
|
|
|
|
|
with VirtualBox as well as on Amazon EC2. Vagrant 1.1 is required for
|
|
|
|
|
EC2, but deploying is as simple as:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ export AWS_ACCESS_KEY_ID=xxx \
|
|
|
|
|
AWS_SECRET_ACCESS_KEY=xxx \
|
|
|
|
|
AWS_KEYPAIR_NAME=xxx \
|
|
|
|
|
AWS_SSH_PRIVKEY=xxx
|
|
|
|
|
$ vagrant plugin install vagrant-aws
|
|
|
|
|
$ vagrant up --provider=aws
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The environment variables are:
|
|
|
|
|
|
|
|
|
|
* `AWS_ACCESS_KEY_ID` - The API key used to make requests to AWS
|
|
|
|
|
* `AWS_SECRET_ACCESS_KEY` - The secret key to make AWS API requests
|
|
|
|
|
* `AWS_KEYPAIR_NAME` - The name of the keypair used for this EC2 instance
|
|
|
|
|
* `AWS_SSH_PRIVKEY` - The path to the private key for the named keypair
|
|
|
|
|
|
|
|
|
|
For VirtualBox, you can simply ignore setting any of the environment
|
|
|
|
|
variables and omit the ``provider`` flag. VirtualBox is still supported with
|
|
|
|
|
Vagrant <= 1.1:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ vagrant up
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Installing on Ubuntu 12.04 and 12.10
|
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
|
|
@@ -119,6 +88,38 @@ Right now, the officially supported distributions are:
|
|
|
|
|
|
|
|
|
|
Docker probably works on other distributions featuring a recent kernel, the AUFS patch, and up-to-date lxc. However this has not been tested.
|
|
|
|
|
|
|
|
|
|
Installing with Vagrant
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
Currently, Docker can be installed with Vagrant both on your localhost
|
|
|
|
|
with VirtualBox as well as on Amazon EC2. Vagrant 1.1 is required for
|
|
|
|
|
EC2, but deploying is as simple as:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ export AWS_ACCESS_KEY_ID=xxx \
|
|
|
|
|
AWS_SECRET_ACCESS_KEY=xxx \
|
|
|
|
|
AWS_KEYPAIR_NAME=xxx \
|
|
|
|
|
AWS_SSH_PRIVKEY=xxx
|
|
|
|
|
$ vagrant plugin install vagrant-aws
|
|
|
|
|
$ vagrant up --provider=aws
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The environment variables are:
|
|
|
|
|
|
|
|
|
|
* `AWS_ACCESS_KEY_ID` - The API key used to make requests to AWS
|
|
|
|
|
* `AWS_SECRET_ACCESS_KEY` - The secret key to make AWS API requests
|
|
|
|
|
* `AWS_KEYPAIR_NAME` - The name of the keypair used for this EC2 instance
|
|
|
|
|
* `AWS_SSH_PRIVKEY` - The path to the private key for the named keypair
|
|
|
|
|
|
|
|
|
|
For VirtualBox, you can simply ignore setting any of the environment
|
|
|
|
|
variables and omit the ``provider`` flag. VirtualBox is still supported with
|
|
|
|
|
Vagrant <= 1.1:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ vagrant up
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage examples
|
|
|
|
|
==============
|
|
|
|
|
@@ -144,7 +145,7 @@ Starting a long-running worker process
|
|
|
|
|
(docker -d || echo "Docker daemon already running") &
|
|
|
|
|
|
|
|
|
|
# Start a very useful long-running process
|
|
|
|
|
JOB=$(docker run /bin/sh -c "while true; do echo Hello world!; sleep 1; done")
|
|
|
|
|
JOB=$(docker run base /bin/sh -c "while true; do echo Hello world!; sleep 1; done")
|
|
|
|
|
|
|
|
|
|
# Collect the output of the job so far
|
|
|
|
|
docker logs $JOB
|
|
|
|
|
@@ -179,6 +180,51 @@ Expose a service on a TCP port
|
|
|
|
|
echo "Daemon received: $(docker logs $JOB)"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Contributing to Docker
|
|
|
|
|
======================
|
|
|
|
|
|
|
|
|
|
Want to hack on Docker? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete.
|
|
|
|
|
|
|
|
|
|
Contribution guidelines
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
### Pull requests are always welcome
|
|
|
|
|
|
|
|
|
|
We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it.
|
|
|
|
|
|
|
|
|
|
If your pull request is not accepted on the first try, don't be discouraged! If there's a problen with the implementation, hopefully you received feedback on what to improve.
|
|
|
|
|
|
|
|
|
|
We're trying very hard to keep Docker lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature.
|
|
|
|
|
However there might be a way to implement that feature *on top of* docker.
|
|
|
|
|
|
|
|
|
|
### Discuss your design on the mailing list
|
|
|
|
|
|
|
|
|
|
We recommend discussing your plans [on the mailing list](https://groups.google.com/forum/?fromgroups#!forum/docker-club) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point
|
|
|
|
|
you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
|
|
|
|
|
|
|
|
|
### Create issues...
|
|
|
|
|
|
|
|
|
|
Any significant improvement should be documented as a github issue before anybody start working on it.
|
|
|
|
|
|
|
|
|
|
### ...but check for existing issues first!
|
|
|
|
|
|
|
|
|
|
Please take a moment to check that an issue doesn't already exist documenting your bug report or improvement proposal.
|
|
|
|
|
If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Write tests
|
|
|
|
|
|
|
|
|
|
Golang has a great testing suite built in: use it! Take a look at existing tests for inspiration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Setting up a dev environment
|
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
|
|
Coming soon!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
What is a Standard Container?
|
|
|
|
|
=============================
|
|
|
|
|
|