Add HasValidGITPrefix to utils/utils.go

This will allow us to use a common Git prefix check for both api/clients/commands.go and
builder/job.go. Previous prefix check in build from Git (in builder/jobs.go) ignored valid prefixes such as "git@", "http://" or "https://".

Signed-off-by: Lakshan Perera <lakshan@laktek.com>
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>
Reword a sentence bringing confusion about docker links

As [discovered][1] doing user support, the sentence `You've learned that a link creates a
source container that can provide information about itself to a recipient container` brings
confusion.

[1]: http://stackoverflow.com/questions/26652877/how-to-avoid-redundant-container-linking-in-docker-when-propagating-ip-addresses/26654203?noredirect=1#comment41945048_26654203

Signed-off-by: Thomas LEVEIL <thomasleveil@gmail.com>
Merge pull request #8468 from laktek/master

Fix URL check in build from Git.
adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Merge pull request #8167 from brahmaroutu/expose_ports_1834

adding support for port ranges on --expose
Merge pull request #8884 from thomasleveil/userguide-so26652877

Reword a sentence bringing confusion about docker links
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>