Set state running before dumping to disk

Fixes #4766
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)

Conflicts:
	daemon/container.go

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: vieux)
Add a conditional to contrib/init/sysvinit-debian/docker for Dash vs Bash support

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)

Docker-DCO-1.1-Signed-off-by: Tianon Gravi <admwiggin@gmail.com> (github: vieux)
Always mark as stopped for non running containers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: vieux)
Copy values out of hostConfig
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: vieux)
Bump version to v1.1.2

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Merge pull request #7172 from vieux/bump_v1.1.2

Bump v1.1.2
Apply @jamtur01's copy edit's to certificates.md

Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: timthelion)
Use only unavailable image when load from Tarball

Docker-DCO-1.1-Signed-off-by: Satoshi Amemiya <satoshi_amemiya@voyagegroup.com> (github: rail44)
Enable `docker search` on private docker registry.
The cli interface works similar to other registry related commands:

  docker search foo

... searches for foo on the official hub

  docker search localhost:5000/foo

... does the same for the private reg at localhost:5000

Signed-off-by: Daniel Menet <membership@sontags.ch>
Fix error message on logging events

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Catch error on console creation

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Move declaration of DockerCli to top of file for readability

Signed-off-by: Solomon Hykes <solomon@docker.com>
Rename a method for clarity

Signed-off-by: Solomon Hykes <solomon@docker.com>
Fix log message on http handler error

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Expand hostname before passing it to NewRegistry()

Signed-off-by: Daniel Menet <membership@sontags.ch>
Test on container events

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Test on untag and delete events

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Merge pull request #6301 from rail44/feature-load-only-not-exist-image

Use only unavailable image when load from Tarball
Merge pull request #7520 from LK4D4/more_events_test

More events test
Merge pull request #7499 from LK4D4/fix_events_error

Fix error message on logging events