Fix duplicate iptables rules

If iptables version is < 1.4.11, try to delete the rule vs. checking if it exists. Fixes #6831.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> (github: jfrazelle)
use correct apt-key for test.docker.io/ubuntu

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
DisableNetworkBidge doesn't need to be public anymore

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Return errors in NewDaemonFromDirectory instead of calling Fatal

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Add some documentation for the RestartPolicy feature.

Signed-off-by: Jean-Paul Calderone <jean-paul@clusterhq.com>
Refactor use of graphdriver.Differ

Some graphdrivers are Differs and type assertions are made
in various places throughout the project. Differ offers some
convenience in generating/applying diffs of filesystem layers
but for most graphdrivers another code path is taken.

This patch brings all of the logic related to filesystem
diffs in one place, and simplifies the implementation of some
common types like Image, Daemon, and Container.

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
graphdriver interface name change, typo fix

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
Add "docker create" support

This exposes the already existing "create container" operation.  It is
very similar to "docker run -d" except it doesn't actually start the
container, but just prepares it. It can then be manually started using
"docker start" at any point.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Conflicts:
	api/client/commands.go
	runconfig/parse.go
	server/container.go

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
integration-cli: Add docker create tests

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
docs fix

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Add create to contrib/completion

Signed-off-by: Tibor Vass <teabee89@gmail.com>
add 'docker create' man page

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Resolve conflicts with restart policies

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Merge pull request #8068 from jfrazelle/cleanup-various-fix-me-refs

Cleanup various fix me refs
Merge pull request #7989 from jlhawn/graphdriver_differ_refactor

Refactor use of graphdriver.Differ
Merge pull request #7110 from tiborvass/merge-6907

Docker create (rebase of 6907)
Allow extra lines in /etc/hosts

This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
Merge pull request #8019 from thockin/add-host

Allow extra lines in /etc/hosts
Improved X-Registry-Auth content instructions

Hi,

this is a small contribution to fix some slightly unprecise information about the `X-Registry-Auth` header required to pull from private registries through the remote API. After a lot of trial and I error I managed to find that the documentation indications had this issues:

* Apparently single quotes cannot be used and double quotes (regular JSON) is required.
* Also the `auth` key must be passed even if empty or a 403 will result.
* It was not clear what the `serveraddress` had to be.

I added some small clarifications for anyone taking a look at the docs to keep them from the problems I've encountered. Hope this is helpful.

Thanks to all the contributors for bringing so much awesomeness to the linux world. :)

Signed-off-by: David Pelaez Tamayo <hello@davidpelaez.me>
Add an option to disable IP masquerading

For the cases where --bip option is used it is sometimes best to disable
IP masquerading as the provided bridge IP range may be routable.

Signed-off-by: Eugene Yakubovich <eugene.yakubovich@coreos.com>