devmapper: Maks createSnapDevice a function, not a method

No idea why this was a method. Maybe a cut and paste bug.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
devmapper: Move error detection to devmapper.go

This moves the EBUSY detection to devmapper.go, and then returns
a real ErrBusy that deviceset uses.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
devmapper: Simplify thin pool device id allocation

Instead of globally keeping track of the free device ids we just
start from 0 each run and handle EEXIST error and try the next one.

This way we don't need any global state for the device ids, which
means we can read device metadata lazily. This is important for
multi-process use of the backend.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
devmapper: Store metadata in one file per device

This allows multiple instances of the backend in different containers
to access devices (although generally only one can modify/create them).

Any old metadata is converted on the first run.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
docker rmi -f works with stopped containers + revamped error messages

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
update message

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
reapply Cmd value even if CmdAdd returns early
Docker-DCO-1.1-Signed-off-by: Maximilian Goisser <goisser94@gmail.com> (github: hobofan)
UTIME_OMIT is only available on Linux

Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
Update hack/dind to match the rest of our scripts

No functional changes here, just coding style and maintainability.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Update hack/dind to mount cgroups on "/cgroup" instead of "/sys/fs/cgroup" for better compatibility

Fixes #5122

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
modernise the MAINTAINER process documentation to line up with what I understand it to be

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
check if the daemon is run as root on startup

This commit makes Docker throw an error if the daemon isn't started as
root.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
update AUTHORS

Docker-DCO-1.1-Signed-off-by: Bryan Matsuo <bryan.matsuo@gmail.com> (github: bmatsuo)
Add notes about git commit messages

This improves readability of commits a lot and is easy to
follow. I think most people follow those rules already. They are based
on http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

Docker-DCO-1.1-Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org> (github: discordianfish)
FIXES #5398: pkg/graphdb build only dependent on cgo tag

Docker-DCO-1.1-Signed-off-by: Bryan Matsuo <bryan.matsuo@gmail.com> (github: bmatsuo)
Make Jerome Petazzoni a maintainer for dind

In the spirit of getting more contributors to maintain their
components.. I nominate @jpetazzo ot maintain dind (he's the original
author).

@jpetazzo I don't expect this to be too much load, but it's a good and
symbolic start :)

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Improve code/comment/output markings & display consistency

This PR aims to increase the consistency across the docs for
code blocks and code/comment/output markings.

Rule followed here is "what's visible on the screen should be reflected"

Issue:

 - Docs had various code blocks showing: comments, commands & outputs.
 - All three of these items were inconsistently marked.

Some examples as to how this PR aims to introduce improvements:

1. Removed `> ` from in front of the "outputs". Eg,
`    > REPOSITORY                 TAG       ID              CREATED` replaced with:
`    REPOSITORY                 TAG       ID              CREATED`.

2. Introduced `$` for commands. Eg,
`    sudo chkconfig docker on` replaced with:
`    $ sudo chkconfig docker on`

3. Comments:
`    > # ` replaced with:
`    # `.

> Please note:
> Due to a vast amount of items reviewed and changed for this PR, there
> might be some individually incorrect replacements OR patterns of incorrect
> replacements. This PR needs to be reviewed and if there is anything missing,
> it should be improved or amended.

Closes:
https://github.com/dotcloud/docker/issues/5286

Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)
Revert "add apparmor to the Dockerfile"

This reverts commit fa1e390cad4fd36683e9667795967c711a4867e3.

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
skip apparmor with dind

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

Fix apparmor inside container