speed up creation of args and msg for huge cmds

Whenever a command arguments is formed by a large linked list, repeatedly
appending to arguments and displayed messages took a long time because go will
have to allocate/copy a lot of times.

This speeds up the allocation by preallocate arrays of correct size for args
and msg

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
use cached images instead of fetching the same image again

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
add a test case for EXPOSE ports order

changing order of EXPOSE ports should not invalidate the cache as the content
doesnt change

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
expose sorts its ports before saving as comment

Saving ports as `map[nat.Port]struct{}` directly has ordering issue which is
more replicatable where we expose a huge number of ports at the same time. As a
result, the cache will be burst whenever the map order is different from the
previous build.
This sorts the ports first and save them as a whitespace-separated list instead
of the map representation, so the order will always be consistent if the port
list isnt changed.

NOTICE: this will burst the old expose caches

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
add test for exposing large number of ports

this test checks if exposing a large number of ports in Dockerfile properly
saves the port in configs. We dont actually expose a VERY large number of ports
here because the result is the same and it increases the test time by a few
seconds

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
CONTRIBUTING: provide a template for new issues

_maybe_ we could even automate this to populate and complain in some
situations.

I see https://github.com/isaacs/github/issues/99 that is old and needs
some love from @github ...

Signed-off-by: Vincent Batts <vbatts@redhat.com>
issue report script

Add a script that will facilitate standard issue reports.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Improve message when pushing a non-existent image

I was confused earlier when I did:

```
docker push localhost.localdomain:1234/foo
```

Because docker told me:

```
No such id: localhost.localdomain:1234/foo
```

I actually had buried in my mind the solution to this, but the error
message
confused me because I had recently had some fun trying to get the
registry
working and therefore thought it was telling me that I didn't have an
account
on the registry.

This pull request makes it unambiguous that the error is that the
specified
image is unknown.

/cc @cpuguy83

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Fix #9462

Docker-DCO-1.1-Signed-off-by: Zoltan Tombol <zoltan.tombol@gmail.com> (github: ztombol)
Add test to enforce volume build content

This tests ensures that the content from a dir within a build is carried
over even if VOLUME for that dir is specified in the Dockerfile.  This
test ensures this long standing functionality.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Using container-vm image alias instead of specific name with version.

Signed-off-by: Dawn Chen <dawnchen@google.com>
Add windows back.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Remove TestRunErrorBindNonExistingSource

This test tests nothing because of error in cmd, where "echo 'should
fail'" passed as binary. Also this test directly contradicts
documentation and current daemon behavior.

Fixes #7826

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Remove TestRunExitOnStdinClose

Because this is already tested by TestRunExitOnStdinClose in
integration-cli/docker_cli_run_test.go

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Fix incorrect error type.

Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com>
Merge pull request #9660 from LK4D4/remove_bad_test

Remove TestRunErrorBindNonExistingSource
Add container list filtering to API docs.

Signed-off-by: Kamil Domański <kamil@domanski.co> (github: kdomanski)
Add available filters for containers, images and events to API docs.

Signed-off-by: Kamil Domański <kamil@domanski.co> (github: kdomanski)
Merge pull request #9630 from ztombol/9642-fix-mkimage-arch

Fix #9462
Merge pull request #9668 from viirya/fix_error_type

Fix incorrect error type