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>
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>
Add some documentation for the RestartPolicy feature.

Signed-off-by: Jean-Paul Calderone <jean-paul@clusterhq.com>
use correct apt-key for test.docker.io/ubuntu

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
It seems that we need these 2 options enabled for both aufs and devicemapper drivers when running on EXT4 - so test for them

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
hack/install.sh: install apparmor when enabled

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Add "hack/install.sh" to the "PRs welcome" note in the end of the install script

Also, simplified the output method by using `cat >&2 <<EOF ...` instead of multiple lines of `echo >&2 '...'`.

Signed-off-by: Andrew Page <admwiggin@gmail.com>
move stdcopy to pkg/stdcopy

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
stdcopy: improve perf by avoiding buffer growth

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Benchmark for StdWriter.Write

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
integcli: run build tests in tmpdir

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
tarsum: name collision fix

If a tar were constructed with duplicate file names, then depending on
the order, it could result in same tarsum.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Removed runconfig.ParseSubcommand

 Removed runconfig.ParseSubcommand, changed it to runconfig.Parse and editted related tests and modules

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>