Add test for #8307.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
fix for iptables cleanup 8307

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
./pkg/archive: clean up Stat_t assertion

inspired by @tonistiigi comment
(https://github.com/docker/docker/pull/8046/files#r19579960)

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Skip V2 registry and immediately fallback to V1 when mirrors are provided

Since V2 registry does not yet implement mirrors, when mirrors are given automatically fallback to V1 without checking V2 first.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Clarify USER instruction documentation

Reuse WORKDIR wording to specify that the USER instructions affect the
following RUN, CMD, and ENTRYPOINT instructions.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Do some cleanup on .dockerignore paths

While working on the fix for #8330 I noticed a few things:
1 - the split() call for the .dockerignore process will generate a blank
    "exclude".  While this isn't causing an issue right now, I got worried
	that in the future some code later on might interpret "" as something bad,
	like "everything" or ".".  So I added a check for an empty "exclude"
	and skipped it
2 - if someone puts "foo" in their .dockerignore then we'll skip "foo".
    However, if they put "./foo" then we won't due to the painfully
	simplistic logic of go's filepath.Match algorithm.  To help things
	a little (and to treat ./Dockerfile just like Dockerfile) I added
	code to filepath.Clean() each entry in .dockerignore.  It should
	result in the same semantic path but ensure that no matter how the
	user expresses the path, we'll match it.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Fix typo in api docs: stdou -> stdout
Fix help text being incorrect with multiple args

E.g. "docker foobar run" would have printed "Command not found:
foobar" and printed the help text for "run". It should instead
print the root help message for docker.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Update "official repos" doc to mention 100 char short desc limit

The Hub no longer accepts short descriptions over 100 characters.

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Merge pull request #8928 from tianon/not-200-chars-anymore

Update "official repos" doc to mention 100 char short desc limit
Fix deadlock in ps exited filter

Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Merge pull request #8929 from LK4D4/fix_filter_hang

Fix deadlock in ps exited filter
Merge pull request #8927 from bfirsh/dont-pass-args-to-help-when-command-doesnt-exist

Fix help text being incorrect with multiple args
Update logrus to v0.6.0 so we can use ParseLevel() for PR #8335

Signed-off-by: Doug Davis <dug@us.ibm.com>
Merge pull request #8907 from icecrime/clarify_user_instruction_doc

Clarify USER instruction documentation
Merge pull request #8932 from duglin/UpdateLogrus

Update logrus to the latest so we can use ParseLevel() for PR #8335
Merge pull request #8739 from duglin/CleanupDockerIgnores

Do some cleanup on .dockerignore paths
Merge pull request #8901 from dmcgowan/v2_registry_mirror_check

Skip V2 registry and immediately fallback to V1 when mirrors are provided
Merge pull request #8590 from jfrazelle/8307-iptables-d-restart-fix

On daemon shutdown iptables cleanup successfully
Merge pull request #8863 from vbatts/vbatts-archive_stat

./pkg/archive: clean up Stat_t assertion